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>createdsectionIdconfiguration to allow sections to utilizeleaveForoption -
<new RenderProp>added 4 neighbor options forFocusableSectionto 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:
componentWillMountis being deprecated - Order is important, and when mounting new components,
componentWillUnmountis 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