Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Unidirectional Data Flow React

In React, Unidirectional data flow describes a one-way data flow where 
the data can move in only one pathway when being transferred between 
different parts of the program.React, a Javascript library, 
uses unidirectional data flow. The data from the parent is known 
as props. You can only transfer data from parent to child and 
not vice versa. This means that the child components cannot update 
or modify the data on their own, makeing sure that a clean data flow 
architecture is followed. This also means that you can control 
the data flow better.

React Components act with: Data Down, Action Up

Data Down:
The first and more simple concept, “data down,” refers to the passing 
of data and/or functions via props from parent to child components. 
These props are passed down when a child component gets created. 
We pass data down to child components so they can render them 
on to the DOM.

Action Up:
Action Up refers to sending data back up to the parent from the child 
component with the help of some action or event. Often these actions 
are connected to a callback function.
Comment

PREVIOUS NEXT
Code Example
Javascript :: spining load react component 
Javascript :: siwtch case javascript 
Javascript :: react conditional array item 
Javascript :: new variable in loop javascript 
Javascript :: get minutes and seconds of long seconds 
Javascript :: findindex js 
Javascript :: react map gl 
Javascript :: how to use put to request in nodejs 
Javascript :: javascripti remove int character from string 
Javascript :: svg component react js 
Javascript :: how to choose a random name from a list in javascript 
Javascript :: react declare multiple states 
Javascript :: Limit text to specified number of words using Javascript 
Javascript :: jquery select dropdown 
Javascript :: javascript select n random from array 
Javascript :: open sans font 
Javascript :: canvas rounded corners on image 
Javascript :: Xpath select Parent Node Based On Child Node 
Javascript :: bcrypt nodejs hash password 
Javascript :: how to add data to array in javascript dynamically 
Javascript :: typescript/JavaScript time ago from datetime 
Javascript :: add webpack to react project tutorial 
Javascript :: match city regex 
Javascript :: react-dom and babel cdn 
Javascript :: knexjs search uppercase 
Javascript :: react native password strength 
Javascript :: javascript check if array 
Javascript :: Example: Export a Variable in Node 
Javascript :: jquery append to table 
Javascript :: iterate through an array 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =