Create React App
Create React App is a comfortable environment for
learning React, and is the best way to start building a
new single-page application in React.
It sets up your development environment so that you can
use the latest JavaScript features, provides a nice
developer experience, and optimizes your app for
production. You’ll need to have Node >= 14.0.0 and npm
>= 5.6 on your machine. To create a project, run:
- npx create-react-app my-app
- cd my-app
- npm start
Next.js
Next.js is a popular and lightweight framework for
static and server‑rendered applications built with
React. It includes styling and routing solutions out of
the box, and assumes that you’re using Node.js as the
server environment.Learn Next.js from its official guide
In a typical React application, data is passed top-down
(parent to child) via props, but such usage can be
cumbersome for certain types of props (e.g. locale
preference, UI theme) that are required by many
components within an application. Context provides a way
to share values like these between components without
having to explicitly pass a prop through every level of
the tree.Context is designed to share data that can be
considered “global” for a tree of React components, such
as the current authenticated user, theme, or preferred
language. For example, in the code below we manually
thread through a “theme” prop in order to style Button
component