react-js-spatial-navigation
react-js-spatial-navigation copied to clipboard
RenderProps for FocusableSection (maps to `leaveFor`) + 1 lifecycle update for removing sections
-
<new RenderProp>
createdsectionId
configuration to allow sections to utilizeleaveFor
option -
<new RenderProp>
added 4 neighbor options forFocusableSection
to allow for declarative navigation between sections- documented new properties
-
neighborUp
/neighborRight
/neighborDown
/neighborLeft
- mapped into the js-spatial-navigation config option for a section:
leaveFor{up, right, down, left}
- Allowed for empty string "", to force a wall at the edge of a section
- mapped into the js-spatial-navigation config option for a section:
- moved
JsSpatialNavigation.add()
inside ofcomponentDidMount
- Note:
componentWillMount
is being deprecated - Order is important, and when mounting new components,
componentWillUnmount
is called aftercomponentWillMount
, which means duplicates between routes can occur once routing is introduced
- Note:
- removed package-lock.json because it was tied to free-bsd, which means cannot build on mac/windows, so let build env determine