Skip to main content

Basic concept of React

The basic concepts of React include:

  • component

  • state management

  • props

  • Event management

  • made conditional

  • list rendering

  • Components are reusable blocks of code that are used to build the user interface of a React application. They can take input data (props) and return a visual representation of that data in the form of HTML elements.

  • State management is how dynamic data in an application is managed and updated. In React, state can be managed inside a component or using a third-party library, such as Redux.

  • Props are data that is passed to a React component as arguments. They allow components to receive data from their parent components and use it to display information in their rendering.

    • we use it for non-updated content, if you need to update you have to go through the status
  • Events are actions that occur in the user interface, such as

    • mouse clicks
    • text modifications
    • interactions with DOM elements.

In React, events are handled using callback functions that are executed when an event is triggered.

  • Conditional rendering is React's way of showing or hiding elements based on certain conditions. This allows the user interface to be personalized based on user data and actions. (example: Connect / connected
  • List rendering is React's way of displaying data in list form. This allows datasets to be displayed efficiently by using a single component to generate multiple items in a list. Like maps, lists of videos, images...