# React

## Notes

* Immediate mode simply means you specify what to redraw on every frame, there is no caching unless you specify it. And you basically redraw whenever some state changes (in a game this is going to be at frame rate).
  * In React, when some state changes, you respecify the DOM for components whose state has changed, but asynchronously the library determines how to make the DOM update more efficient on the next frame redraw.
* Retained-mode means you modify the scene graph (aka DOM) using imperative statements, it is difficult to keep your UI in sync with your models. With immediate-mode, you simply create a function f(m) over your model m to render it on each frame rate (which also often involves imperative instructions affecting the frame buffer, but the buffer can be cleared on each frame so who cares).
  * Retained-mode caches by default (often in opaque ways), which was the whole point (only re-render parts of the scene that have changed). You can roll your own caching for immediate mode, usually via some kind of invalidation scheme (use image for a node if nothing changed for this component, otherwise call that node's re-render method). On the other side, projects like React takes the retained-mode DOM and make it look more like an immediate-mode abstraction without sacrificing so much performance.
* The core premise for React is that UIs are simply a projection of data into a different form of data.
* [A React component is simply a JavaScript function that takes an object of arbitrary inputs known as props and returns React elements describing what should be rendered on the UI.](https://blog.logrocket.com/a-complete-guide-to-default-props-in-react-984ea8e6972d)
* Stateless components don't have `this`, just have props.
* [Is Concurrent Mode just a workaround for “virtual DOM diffing” overhead? Some people got that impression. Let me clarify why we’re working on it.](https://mobile.twitter.com/dan_abramov/status/1120971795425832961)
* [In order to write a very performant app there's only one golden rule: Make sure that your components are only re-rendered when necessary, and make sure that each render is fast](https://github.com/fabiospampinato/overstated#faq)
* Best use React in [strict mode](https://reactjs.org/docs/strict-mode.html).

## Links

* [React as a UI Runtime (2019)](https://overreacted.io/react-as-a-ui-runtime/) ([HN](https://news.ycombinator.com/item?id=19067302))
* [React is Changing How We Think, Again (2019)](https://rjzaworski.com/2019/02/react-is-changing-how-we-think-again)
* [A practical understanding of Flux](http://drewdevault.com/2015/07/20/A-practical-understanding-of-Flux.html)
* [Advanced React Component Patterns](https://egghead.io/courses/advanced-react-component-patterns)
* [Introduction to The Beginner's Guide to ReactJS](https://egghead.io/lessons/react-introduction-to-the-beginner-s-guide-to-reactjs)
* [React - Basic Theoretical Concepts](https://github.com/reactjs/react-basic#readme)
* [Didact](https://github.com/hexacta/didact) - DIY guide to build your own React.
* [ReactiFlux Learning](https://www.reactiflux.com/learning/)
* [Tom Occhino and Jordan Walke first presenting React](https://www.youtube.com/watch?v=GW0rj4sNH2w)
* [My struggle to learn react](http://bradfrost.com/blog/post/my-struggle-to-learn-react/) ([HN comments](https://news.ycombinator.com/item?id=17030865))
* [Stop writing code - Sunil Pai (2018)](https://www.youtube.com/watch?v=WYWVGQKnz5M) - Great talk.
* [The Present Future of User Interface Development](https://hackernoon.com/the-present-future-of-user-interface-development-ebd371255175)
* [React from Zero](https://github.com/kay-is/react-from-zero#readme) - Simple (99% ES2015 less) tutorial for React.
* [React is just JavaScript (2018)](https://medium.com/yld-engineering-blog/react-is-just-javascript-88600553269c)
* [React Developer Roadmap](https://github.com/adam-golab/react-developer-roadmap#readme)
* [Defining Component APIs in React](http://jxnblk.com/writing/posts/defining-component-apis-in-react/)
* [Rogue.js](https://github.com/alidcastano/rogue.js) - Nearly invisible framework for creating server-rendered React applications.
* [Diagram of modern React lifecycle methods (2018)](https://twitter.com/dan_abramov/status/981712092611989509?s=09)
* [React Fundamentals](https://github.com/ryanflorence/react-fundamentals#readme)
  * [Advanced React](https://github.com/ryanflorence/advanced-react-workshop#readme)
* [Algebraic Effects, Fibers, Coroutines . . . Oh My! - Brandon Dail (2018)](https://www.youtube.com/watch?v=cWY1QzyFhfk)
* [Understanding React and reimplementing it from scratch Part 1: Views](https://gcanti.github.io/2014/10/29/understanding-react-and-reimplementing-it-from-scratch-part-1.html)
* [React (without the buzzwords) course](https://frontarm.com/courses/learn-raw-react)
* [Conditional Rendering with React: The Complete Guide](https://frontarm.com/articles/react-conditional-rendering/)
* [React Events Live Cheatsheet](https://frontarm.com/toolbox/react-events-cheatsheet/)
* [Complete guide to default props in React](https://blog.logrocket.com/a-complete-guide-to-default-props-in-react-984ea8e6972d)
* [A deep dive into children in React](https://mxstbr.blog/2017/02/react-children-deepdive/)
* [Introduction to React Book](https://survivejs.com/react/introduction/)
* [React Today and Tomorrow and 90% Cleaner React (2018)](https://www.youtube.com/watch?v=dpw9EHDh2bM)
* [Concurrent Rendering in React - Andrew Clark and Brian Vaughn (2018)](https://www.youtube.com/watch?v=ByBPyMBTzM0)
* [Intro to debugging ReactJS applications](https://medium.com/@baphemot/intro-to-debugging-reactjs-applications-67cf7a50b3dd)
* [Evergreen](https://github.com/segmentio/evergreen) - React UI Framework by Segment.
* [React Demystified (2014)](http://blog.reverberate.org/2014/02/react-demystified.html)
* [Inside Fiber: in-depth overview of the new reconciliation algorithm in React (2018)](https://medium.com/react-in-depth/inside-fiber-in-depth-overview-of-the-new-reconciliation-algorithm-in-react-e1c04700ef6e)
* [Why Do We Write super(props)? (2018)](https://overreacted.io/why-do-we-write-super-props/)
* [How Does React Tell a Class from a Function? (2018)](https://overreacted.io/how-does-react-tell-a-class-from-a-function/)
* [How Does setState Know What to Do? (2018)](https://overreacted.io/how-does-setstate-know-what-to-do/)
* [My Wishlist for Hot Reloading (2018)](https://overreacted.io/my-wishlist-for-hot-reloading/)
* [Navi](https://github.com/frontarm/navi) - Batteries-included router for React.
* [Re-implement react fiber (2019)](https://github.com/tranbathanhtung/react-fiber-implement) - Self-study project help understand how react work.
* [Michael Jackson - Never Write Another HoC (2017)](https://www.youtube.com/watch?v=BcVAq3YFiuc)
* [React-axe](https://github.com/dequelabs/react-axe) - Accessibility auditing for React.js applications.
* [Awesome React](https://github.com/enaqx/awesome-react#readme) - Collection of awesome things regarding React ecosystem.
* [Grommet](https://github.com/grommet/grommet) - React-based framework that provides accessibility, modularity, responsiveness, and theming in a tidy package.
* [Application that will help you learn React fundamentals](https://github.com/tyroprogrammer/learn-react-app) ([HN](https://news.ycombinator.com/item?id=19050509))
* [Progressive react](https://houssein.me/progressive-react) - Want to make your React site more performant? Here's a quick checklist.
* [Relay](https://github.com/facebook/relay) - JavaScript framework for building data-driven React applications.
* [Scheduling in React (2019)](https://philippspiess.com/scheduling-in-react/)
* [Writing Resilient Components (2019)](https://overreacted.io/writing-resilient-components/)
* [React Fiber Architecture](https://github.com/acdlite/react-fiber-architecture#readme) - Description of React's new core algorithm, React Fiber.
* [Router5](https://github.com/router5/router5) - Flexible and powerful universal routing solution.
* [Unstated Next](https://github.com/jamiebuilds/unstated-next) - 200 bytes to never think about React state management libraries ever again.
* [React Europe (2019)](https://www.youtube.com/watch?v=ERS0DO2xlAk)
* [Security and Data in React - Richard Threlkeld (2019)](https://www.youtube.com/watch?v=1N0lNLHYGVs)
* [Best practices for building a large scale react application (2019)](https://buttercms.com/blog/best-practices-for-building-a-large-scale-react-application)
* [Easy peasy state for React](https://github.com/ctrlplusb/easy-peasy)
* [SMOOSHCAST: React Fiber Deep Dive with Dan Abramov (2019)](https://www.youtube.com/watch?v=aS41Y_eyNrU)
* [Fresh Concurrent React](https://github.com/sw-yx/fresh-concurrent-react) - Fresh links about the coming concurrent react revolution.
* [Fusion.js](https://github.com/fusionjs/fusionjs) - Modern framework for fast, powerful React apps.
* [React Live](https://github.com/FormidableLabs/react-live) - Production-focused playground for live editing React code.
* [React/Redux Links](https://github.com/markerikson/react-redux-links#readme)
* [TypeScript React Cheat Sheet](https://www.saltycrane.com/typescript-react-cheat-sheet/latest/) - List of TypeScript types generated from the declaration files for react, react-dom, react-native and other libraries.
* [Why is React doing this? by Sebastian Markbåge (2019)](https://gist.github.com/sebmarkbage/a5ef436427437a98408672108df01919)
* [React Patterns](https://reactpatterns.com/)
* [Understanding React Components and State (2019)](https://www.framer.com/blog/posts/react-components-state/)
* [Announcing Ionic React (2019)](https://ionicframework.com/blog/announcing-ionic-react/)
* [Divjoy](https://divjoy.com) - React codebase generator.
* [React Concurrent Mode](https://reactjs.org/docs/concurrent-mode-intro.html) ([HN](https://news.ycombinator.com/item?id=21346290))
* [React Conf 2019](https://www.youtube.com/watch?v=RCiccdQObpo)
* [zustand](https://github.com/react-spring/zustand) - Small, fast and scaleable bearbones state-management solution.
* [Learn React Courses](https://learnreact.design/)
* [Building a Custom React Renderer | Sophie Alpert (2019)](https://www.youtube.com/watch?v=CGpMlWVcHok) ([Code](https://github.com/sophiebits/react-dom-mini))
* [Thoughts on Suspense for data fetching (2019)](https://sgt.hootr.club/molten-matter/thoughts-on-suspense/)
* [Simplifying React component testing (2019)](https://medium.com/@andythedev/simplifying-react-component-testing-3958f8fa1a7)
* [Relay](https://github.com/facebook/relay) - JavaScript framework for building data-driven React applications.
* [Reatom](https://github.com/artalar/reatom) - Declarative and reactive state manager, designed for both simple and complex applications.
* [Tried & True Tips from 25 React Experts to Make You More Productive (2019)](https://www.telerik.com/kendo-react-ui/react-best-practices-and-productivity-tips/)
* [Build your own React (2019)](https://pomb.us/build-your-own-react/) ([HN](https://news.ycombinator.com/item?id=21536789)) ([Code](https://github.com/pomber/didact))
* [What is the most impressive React-based site you've seen? (2019)](https://www.reddit.com/r/reactjs/comments/e1ac7p/what_is_the_most_impressive_reactbased_site_youve/)
* [Blocks UI](https://blocks-ui.com/) - JSX-based page builder for creating beautiful websites without writing code. ([Code](https://github.com/blocks/blocks))
* [WTF is Up with Refs? (2019)](http://naomiajacobs.com/wtf-is-up-with-refs/)
* [Can you feel the Suspense?! (2019)](https://react.christmas/2019/5) ([HN](https://news.ycombinator.com/item?id=21710718))
* [Authentication in React Applications (2019)](https://kentcdodds.com/blog/authentication-in-react-applications)
* [Minimal Images from Unsplash](https://github.com/iRaul/minimal-unsplash-images) - Project was bootstrapped with Create React App.
* [CodeLift](https://github.com/ericclemmons/codelift) - "No Code" GUI for your existing React code.
* [My top React techtalks of 2019](https://www.reddit.com/r/reactjs/comments/eay5cg/my_top_react_techtalks_of_2019/)
* [React Christmas](https://react.christmas/)
* [suspense-cache](https://github.com/SamyPesse/suspense-cache) - Cache utility to create resources for React suspense.
* [Snowpack with React: An awesome way to build web applications (2020)](https://dev.to/ryanlanciaux/snowpack-with-react-ch3)
* [What I've Learned About Testing React Apps (2020)](https://dev.to/tlakomy/what-i-ve-learned-about-testing-react-apps-part-1-55g7)
* [Proton Native](https://github.com/kusti8/proton-native) - React environment for cross platform desktop apps.
* [Make Impossible States Impossible](https://kentcdodds.com/blog/make-impossible-states-impossible)
* [Jira Clone in React](https://github.com/oldboyxx/jira_clone) - Simplified Jira clone built with React/Babel (Client), and Node/TypeScript (API). Auto formatted with Prettier, tested with Cypress. ([HN](https://news.ycombinator.com/item?id=22159397))
* [iPod.js](https://github.com/tvillarete/ipod-classic-js) - iPod Classic built using React Hooks, TypeScript, & GraphQL.
* [Undux](https://github.com/bcherny/undux) - Simple & typesafe alternative to Flux and Redux.
* [Concurrent Mode issues](https://concurrent-mode-oops.netlify.com/0)
* [React Diff Viewer](https://praneshravi.in/react-diff-viewer/) - Simple and beautiful text diff viewer made with Diff and React. ([Code](https://github.com/praneshr/react-diff-viewer))
* [Advanced memoization and effects in React (2020)](https://gist.github.com/slikts/fd3768de1493419ed9506002b452fcdc)
* [React in patterns](https://krasimir.gitbooks.io/react-in-patterns/content/) - Free book that talks about design patterns/techniques used while developing with React. ([Code](https://github.com/krasimir/react-in-patterns))
* [Awesome list of React Renderer](https://github.com/chentsulin/awesome-react-renderer#readme)
* [What is the React Scheduler? (2020)](https://ahuth.github.io/articles/what-is-the-react-scheduler.html)
* [33 line React](https://leontrolski.github.io/33-line-react.html) ([HN](https://news.ycombinator.com/item?id=22776753))
* [Vidact](https://github.com/mohebifar/vidact) - Compiler that converts React-compatible codes to VanillaJS with no Virtual DOM.
* [Under the hood: React](https://bogdan-lyashenko.github.io/Under-the-hood-ReactJS/) - Entire React code base explanation by visual block schemes (Stack version). ([Code](https://github.com/Bogdan-Lyashenko/Under-the-hood-ReactJS))
