Introduction to ReactJS?
Let we understand this with a practical example:
Lets say one of your friends posted a photograph on Facebook. Now you go and like the image and then you suddenly see that lets check out the comments too. Now while you are browsing over comments you see that likes count increased by count 100 since you liked the picture. Yes and there was no reload of the page, just somehow magically the count changed. Behind this magic its react.js.
React uses a declarative paradigm that makes it easier to reason about your application and aims to be both efficient and flexible. It design simple views for each state in your application, and React will efficiently update and render just the right component when your data changes.Declarative view make your code more predictable and easier to debug.
A react application is made of multiple components, each responsible for rendering a small, reusable piece of HTML. Components can be nested within other components to allow complex applications to be built out of simple building blocks. A component may also maintain internal state – for example a TabList component may store a variable corresponding to the currently open tab.
NOTE: React is not a framework. It is just a library developed by Facebook to solve some problems that they were facing.
How does it works:
Although React was conceived to be used in the browser, because of its design it can also be used in the server with Node.js.
References : https://facebook.github.io/react/
This article is contributed by Amit Khandelwal. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- ReactJS | Introduction to JSX
- ReactJS | Calculator App ( Introduction )
- ReactJS | ReactDOM
- ReactJS | Props - Set 2
- ReactJS | PropTypes
- ReactJS | Props - Set 1
- ReactJS | Components
- ReactJS | Lists
- ReactJS | Keys
- ReactJS | Components - Set 2
- ReactJS | Calculator App ( Structure )
- ReactJS | Transition Group
- ReactJS | Calculator App ( Building UI )
- ReactJS | Importing and Exporting
- ReactJS | Calculator App ( Styling )