Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Unidirectional Data Flow

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 :: async useeffect 
Javascript :: check array values equal js 
Javascript :: filter json array by key in angular 9 
Javascript :: randomize an array in javascript 
Javascript :: get minutes and seconds from youtube seconds on js 
Javascript :: get element by id inside first element by class in JavaScript 
Javascript :: check if a date is more than 18 years javascript 
Javascript :: js compare elements of two arrays 
Javascript :: set file upllaod via javascript to html input 
Javascript :: angularjs dropdown 
Javascript :: vue 3 route params 
Javascript :: Extract the domain name from a URL 
Javascript :: comment out in javascript 
Javascript :: randint js 
Javascript :: react router dom change default path 
Javascript :: TypeError: Class constructor Model cannot be invoked without 
Javascript :: compare mongoose id 
Javascript :: react native font based on viewport dimensions 
Javascript :: javascript remove object key 
Javascript :: Divide the number in js 
Javascript :: filter object js 
Javascript :: js delete json element 
Javascript :: react app 
Javascript :: A bad HTTP response code (404) was received when fetching the script. 
Javascript :: inverse of stringify js 
Javascript :: react native password 
Javascript :: preview image before upload reactjs 
Javascript :: textbox in javascript 
Javascript :: check if object is not defined js 
Javascript :: jsx inline style 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =