365体育足球滚球比分

365体育足球滚球比分 React (also known as React.js or ReactJS) is a JavaScript library developed by Facebook for building user interfaces. It uses a declarative, component-based paradigm and aims to be both efficient and flexible.

is a 365体育足球滚球比分 library for building user interfaces.

It uses a declarative paradigm which makes it easier to reason about the application, aiming for both efficiency and flexibility. Initially developed internally at Facebook, React has since been made open source where it continues to be developed and maintained by Facebook and the open source community.


Just the UI

365体育足球滚球比分Lots of people use React as the V in MVC. React makes no assumptions about the rest of your technology stack, and it's easy to try it out on a small feature in an existing project.


Virtual DOM

React uses a virtual DOM diff implementation for ultra-high performance. It can also render on the server using — a heavy browser DOM isn't required. Further, there is a React-Native offshoot for using React on mobile devices such as and .


Data flow

365体育足球滚球比分React implements one-way reactive data flow using props which reduce boilerplate and is easier to understand than traditional two-way data binding.


Example using JSX

class HelloWorldWidget extends React.Component {
    render() {
        return (
            <div>
                Hello World!
            </div>
        );
    }
};

ReactDOM.render(
    <HelloWorldWidget />,
    document.body
);

Advantages

  • React creates a virtual DOM so that all the components can be re-rendered individually without the need for the whole page to be repainted by the browser

  • A user can update a particular content of the page just by re-rendering only that component

  • 365体育足球滚球比分React's view logic means it can easily render on the server, in the browser or native components

  • React can be used in conjunction with frameworks like and

  • Separating the declarative view () and logic make projects easier to read and maintain


Resources:


Books:


Related tags


Official Logo:


365体育足球滚球比分 Code Language (used for ): lang-js