Considerations before starting
Whew! I think we're ready to start, but before we dive into the code I want to impart how I believe you should think about the render step in the React component lifecycle as well as a way to approach browser support and form validation.
React and rendering
The way you should think about the React render function is much like the definition of a mathematical function: f(state) = UI
. React treats the DOM as a rendering target, much like a computer program or game treats the Graphics Processing Unit (GPU). State is kind of like the arrays of object data (vertices, and so on). That data is prepared for shipment to the GPU, and the rendering portion of the component lifecycle is kind of like the OpenGL rendering pipeline ...
Get React: Building Modern Web Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.