react-js-spatial-navigation icon indicating copy to clipboard operation
react-js-spatial-navigation copied to clipboard

RenderProps for FocusableSection (maps to `leaveFor`) + 1 lifecycle update for removing sections

Open chwagssd opened this issue 6 years ago • 0 comments

  • <new RenderProp> created sectionId configuration to allow sections to utilize leaveFor option
  • <new RenderProp> added 4 neighbor options for FocusableSection 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
  • moved JsSpatialNavigation.add() inside of componentDidMount
    • Note: componentWillMount is being deprecated
    • Order is important, and when mounting new components, componentWillUnmount is called after componentWillMount, which means duplicates between routes can occur once routing is introduced
  • removed package-lock.json because it was tied to free-bsd, which means cannot build on mac/windows, so let build env determine

chwagssd avatar Nov 12 '18 23:11 chwagssd