React.Js

React.js

React (also known as React.js or ReactJS) is a free and open-source front-end JavaScript library for building user interfaces based on components. It is maintained by Meta (formerly Facebook) and a community of individual developers and companies.

React can be used to develop single-page, mobile, or server-rendered applications with frameworks like Next.js. Because React is only concerned with the user interface and rendering components to the DOM, React applications often rely on libraries for routing and other client-side functionality. A key advantage of React is that it only rerenders those parts of the page that have changed, avoiding unnecessary rerendering of unchanged DOM elements.

See React.js on Wikipedia.

Getting started

The Pro Linux Container of Brap is pre-configured for React.js.

When building a new React.js application or a new website fully with React, it is recommend picking one of the React-powered frameworks popular in the community. Frameworks provide features that most apps and sites eventually need, including routing, data fetching, and generating HTML.

React-powered Next.js

To create a new React-powered Next.js appication and start the develop server for it, run:

npx create-next-app@latest react-next-js
cd react-next.js
npm run dev

React-powered Next.js running in the browser

Screenshot: React-powered Next.js running in the browser

React-powered Remix

To create a new React-powered Remix appication and start the develop server for it, run:

npx create-remix react-remix-js
cd react-remix-js
npm run dev

React-powered Remix running in the browser

Screenshot: React-powered Remix running in the browser

React-powered Gatsby

To create a new React-powered Gatsby appication and start the develop server for it, run:

npx create-gatsby react-gatsby-js
cd react-gatsby-js
npx gatsby develop

To run the React Gatsby application and access it over the internet, run:

npx gatsby develop --host=0.0.0.0

React-powered Gatsby running in the browser

Screenshot: React-powered Gatsby running in the browser

React-powered Expo

To create a new React-powered Expo appication and start the develop server for it, run:

npx create-expo-app react-expo-js
cd react-expo-js
npx expo start

React-powered Expo running in the browser

Screenshot: React-powered Expo running in the browser

For more guides on starting with React.js, see the official guide.

Keywords

  • react
  • js
  • javascript
  • library
  • framework
  • web

Back to top