hat is React??? Library or Framework???
React is a **Javascript **Library, not a framework. It is used for building user interfaces for web applications. It is not a complete solution rather it is adaptive with the other libraries to form any solution. Here I want to mention the Unix philosophy:
Write programs that do one thing and do it well. Write programs to work together.
— Doug McIlroy
React follows this Unix philosophy. It is a small library focused on just one thing and do that thing in the best way.
Virtual Dom ???
ReactJS does not update the real DOM directly. Rather it updates the Virtual DOM. Because updating real DOM is a bit slow. DOM means “Document Object Model”. It’s the browsers’ programming interface for HTML (and XML). DOM defines the logical structure of documents and the way a document is accessed and manipulated.
Virtual DOM vs Real DOM
JSX in ReactJS ???
At first, we should see a variable declaration below —
const intro = <h1>Hello, world!!</h1>;
What happened ?? Isn’t it a funny syntax? It is neither a string nor HTML. Guess what!!! This funny syntax is called JSX. It is a syntax extension to JavaScript. It is recommended to use with react to describe the UI. It comes with the full power of JavaScript.
Why JSX ???
#reactjs #react-hook #javascript