NoriginMedia / react-spatial-navigation

DEPRECATED. HOC-based Spatial Navigation. NEW Hooks version is available here: https://github.com/NoriginMedia/norigin-spatial-navigation
MIT License
226 stars 64 forks source link

Drop recompose and use withFocusable alongside useFocusable hook #93

Closed marnusw closed 2 years ago

marnusw commented 3 years ago

This work builds on #79 by @GeraldHost based on my comment in #77. It seems to be an alternative to #92, with the added benefit of dropping the Recompose library and supporting ref forwarding through withFocusable provided the register callback is used in the child component. Using the register callback is, however, optional. The only requirement to make a component focusable is still to wrap it in the withFocusable HOC as before.

The individual functionalities that were implemented with Recompose have been substituted as follows:

The useFocsable hook has not been exposed as a public API yet, but could be for use in leaf nodes if desired.

asgvard commented 2 years ago

Here is the new version of this library that is migrated to hooks: https://github.com/NoriginMedia/Norigin-Spatial-Navigation