Home > Web Front-end > Front-end Q&A > Can reactjs only run in node?

Can reactjs only run in node?

WBOY
Release: 2022-07-06 17:38:00
Original
2111 people have browsed it

reactjs does not only run in node; it is a JavaScript library used to build user interfaces. In development mode, the Create react application runs NodeJs and Webpack development servers, but if it is not rendered on the server side, reactjs It's just a front-end framework that can be used with JavaScript and does not require node.

Can reactjs only run in node?

The operating environment of this article: Windows 10 system, nodejs version 16, Dell G3 computer.

reactjs does not only run in node

No, it can run wherever js can run

In development mode, yes. The Create react app runs a NodeJs and Webpack development server, allowing you to get feedback when you modify files and start or stop the server.

If you need to render on the server side, you will inevitably use node.

If not used, then it is a pure front-end framework.

Expand knowledge

In the Web development process, if we need to reflect changing data to the UI in real time, we must operate on the DOM. The virtual DOM of reactjs makes page rendering very efficient and more controllable than directly manipulating the DOM.

1. What is reactjs?

originated from Facebook's internal project, used to build the Instagram website, and was open sourced in May 2013;

is one of the three mainstream frameworks of JavaScript libraries;

is a JAVASCRIPT library used to build user interfaces;

is mainly used to build UI, which can be regarded as the view layer and is an efficient view.

2. Two characteristics of reactjs:

Componentization: Building components through reactjs makes it easier to reuse code and can be well applied in large projects is under development.

Virtual DOM: It makes page rendering very efficient and more controllable than directly manipulating the DOM.

3. Advantages:

has high performance and very simple code logic. More and more people have begun to pay attention to and use it.

The combination of reactjs's componentization and efficient virtual DOM gives reactjs powerful top-down page rendering capabilities.

In addition, React provides some novel concepts, libraries and programming principles, which allows us to write fast, compact and beautiful code on the server and client to build web applications~

What is nodejs?

First of all, it is very important to understand that Node is not a web server. It doesn't do anything by itself. It doesn't work like Apache. If you want it to be an HTTP server, you have to write it yourself with the help of its built-in libraries. Node.js is just another way to execute code on the computer. It is a simple JavaScript Runtime.

Simply put, Node.js is JavaScript running on the server.

Node.js is a platform built on the Chrome JavaScript runtime.

Node.js is an event-driven I/O server-side JavaScript environment based on Google's V8 engine. The V8 engine executes Javascript very quickly and has very good performance.

Recommended learning: "nodejs video tutorial"

The above is the detailed content of Can reactjs only run in node?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template