You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chris Achenbach edited this page Feb 12, 2020
·
4 revisions
Main.jsx
This.state = This.initialstate
Make a Data Flow Diagram and figure out which components hold which state. There are currently a bunch of things thrown into the PlanetarySim component that don't need to be there. Such as "multiplier" which is only relevent to the MainView. The PlanetarySim component should ideally only care about making sure data gets sent to the right place. It collects inputs from the interfaces, and connects them up with the displays.
See: https://reactjs.org/docs/thinking-in-react.html
Break apart all the junk in the render() section of PlanetarySim component. Make multiple components for each interface.
Use Conditional Rendering and some if(ENV=='develoment') statements for the debugger, so that it doesn't get bundled into the production version, but can still exist inside the dev version
See: https://reactjs.org/docs/conditional-rendering.html