React Js
React Js
- BY AVISHI JAIN
INTRODUCTION
• All react components are rendered through the render function. These render functions
specify the HTML output of the react component.
• JSX, is a react extension that allows writing Javascript code that looks like HTML.
COMPONENTS
• In this approach, the entire application is divided into small logical groups of code which
are called components.
• It is also considered the building block of any react application.
• Each component exists in the same space but they work independently from one another.
• We have 2 types of components- Functional and Class Components.
PROPS
• Props stands for properties. It is an object that stores the value of attributes of a tag.
• It is used to pass the data in the same way as arguments in a function to components.
• Props are immutable so we can’t modify them from inside the components.
• These can be used to render the dynamic data in the render method.
CONDITIONAL RENDERING
• State is one of the hooks which provide access to the state and other react features.
• It allows us to track and update the state in a functional component.
• Firstly, we have to import the useState hook from react. Then it takes two arguments,
which take the current state and the updated value. Also, the default value is passed as an
argument.
THANK YOU