adityaagharwal1220-blog
adityaagharwal1220-blog
ReactJs basics
7 posts
Don't wanna be here? Send us removal request.
adityaagharwal1220-blog 6 years ago
Link
0 notes
adityaagharwal1220-blog 6 years ago
Link
Please Like, Share, and, comment:聽http://bit.ly/2XSL20M
0 notes
adityaagharwal1220-blog 6 years ago
Link
Please Like, Share, and comment:聽http://bit.ly/2JNlRb0
0 notes
adityaagharwal1220-blog 6 years ago
Link
Please Like, share, and, comment聽http://bit.ly/2GhVXeq
0 notes
adityaagharwal1220-blog 6 years ago
Photo
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
0 notes
adityaagharwal1220-blog 6 years ago
Photo
Tumblr media Tumblr media Tumblr media
0 notes
adityaagharwal1220-blog 6 years ago
Link
A form will pop-up what feels for you to fill out and when you hit enter the app creates that timer for you. When you decide to delete a timer if you click the delete button, the timer will remove itself from the page that is pretty much what you would call a dynamic user interface.
React was created because the facebook develop team wanted a better way to structure JavaScript applications.
So, why use React.Js ?
Number one is for reusable components
Components are a huge part of what makes react so understanding them is crucial when programming with react components let you split your code into separate independent reusable pieces.
You can think of components as functions that can take inputs to call props and return elements describing what should appear on the screen. You also take those already created functions and reuse than in other parts of your app without any problems.
So, react components are like individual Legos that can build something great and then connect it together and they鈥檙e also reusable.
Also Read:
React Is The New jQuery! (Or Is It Vue)
Number two is for the virtual Dom
Even though, javascript is fast enough to handle complex web applications. Dom manipulations are still not too fast.
Updating the Dom is usually the problem when it comes to achieving optimal web performance that鈥檚 where the virtual Dom comes in how the virtual Dom works are.
It keeps a copy of the real Dom in storage and whenever a change is made the update first goes to the virtual Dom.
The virtual Dom then compares its Dom with the real Dom and applies the changes to the real Dom in the most efficient way possible.
The number three is for props and skates
So let鈥檚 start off with props short for properties by the wedding preps are used to let components talk with each other.
That鈥檚 pretty much it, props let you pass data to other components for them to use it and another thing to know about props is that you cannot change props.
And you may be thinking then what can I use for values that change over time what do I need for values that do that change frequently. That鈥檚 where the state comes in.
So props shouldn鈥檛 change but we need inputs that can change its value. The purpose of states is so that components can keep track of information between any renders.
It does when you change a part of the state it updates the objects and then every renders the component. It鈥檚 also important to note that you should have this little state as possible reason being is.
Let鈥檚 say that you have a car, a car has many moving parts and eventually things break.
And the same thing could happen if you have too much state in your react, that location and for components that don鈥檛 need any state.
We have two types of components stateful and stateless components
Also Read:
Learn Reactjs: Become The Highest Paid Front-End Software Developer Today
stateful components | stateless components
stateful components are components using state which means they have values that can change stateless components, on the other hand, are components that don鈥檛 use state, which means they don鈥檛 have values that change.
1 note View note