Hook up save and load buttons
These use a technique where the save/load functionality is passed from the component to its children via a function argument. I opted for this rather than a higher order component because it is more readable and requires fewer intermediary components. This could just as easily been done with a higher order component and would be happy to change it to that instead. There is a performance implication since there is a function being defined in render. However the menu bar is not a highly re-rendered component, so I thought it would be ok in this case.
Showing
- src/components/load-button/load-button.css 0 additions, 3 deletionssrc/components/load-button/load-button.css
- src/components/load-button/load-button.jsx 0 additions, 49 deletionssrc/components/load-button/load-button.jsx
- src/components/menu-bar/menu-bar.jsx 13 additions, 2 deletionssrc/components/menu-bar/menu-bar.jsx
- src/containers/load-button.jsx 12 additions, 14 deletionssrc/containers/load-button.jsx
- src/containers/save-button.jsx 4 additions, 25 deletionssrc/containers/save-button.jsx
Loading
Please register or sign in to comment