React 3
SOURCES
VIDEOS
Why I’m using Next.js in 2020
Learn useContext In 13 Minutes
ARTICLES
NextJs
React Context for Beginners
Why I’m using Next.js in 2020
NOTES
- Next.js is a framework for React that allows you to do server side rendering and static site generation
- uses webpack and babel
- things to consider when making a project using react:
- code has to be bundled using a bundler like webpack and transformed using a compiler like Babel
- need to do production optimizations such as code splitting
- want to statically pre-render some pages for performance and SEO
- write some server side code to connect your React app to your data store
- react context is a way to pass data through the component tree without having to pass props down manually at every level
- context is great for features like themes, authentication, and location
- how to use react context:
- create a context object using React.createContext()
- wrap the app in a context provider
- use the context object in the components you want to access the context