What is React
· It was developed by facebook back in 2013 for building user interfaces (Front end)
· Facebook software engineer Jordan Walke Created it.
Why React ?
· It allows us to create a complex UI by making components (small & isolated prices of code )
· Components are reusable
· Load fast
· External plugin
· Around 45% of world’s website use React.
· Major bands like facebook, instagram , Airbnb , dropbox using React.
· JSX allows us to write and add HTML in React
The main advantage defaultProps has is it gives us a unified way of setting default values to props in both class components and functional components. The second advantage is that the syntax is simple and straightforward
The biggest advantage of PropTypes is shared with other type checkers. It makes it easy to catch bugs caused by passing data in the wrong data type (like a string in a Boolean space). PropTypes has an edge in that it is already built into React. It’s ready to use with a very gentle learning curve.