Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
December 29, 2022 01:25 pm GMT

React Fiber - React Fiber Architecture

React Fiber , React-. .

React Fiber Architecture https://github.com/acdlite/react-fiber-architecture

React Fiber React .

React Fiber React , . .

React Fiber: , , , .

Fiber , . , Fiber React. , , .

, , , .

, , React . . React .

, Fiber . Fiber . .

Fiber , , , , React.

, :

, , .

, .

?

, React-, , .

. , setState. .

API React- . , , , .

, , . React , , . .

DOM. : React , . , , DOM. ( - setState), . , , .

Fiber , React . :

  • , . React , .
  • . , .

vs

DOM React, , iOS Android, React Native. DOM .

React , , React . , , , .

, React DOM React Native , React.

Fiber . , , .

.

, . (, setState).

React , :

React . , React , .
React. push-, . React pull-, , .
React , . , React , , , .
- , . , , . , (, ), (, ).

:

  • .
  • , . , , , .
  • Push- ( ) , . Pull- (React) .

React . . React , Fiber.

Fiber. , , . , , .

?

React Fiber. (fiber) , . , . . ( , , .)

!

, Fiber React . , :

  • .
  • .
  • .
  • , .

, . , . .

, React- , v = f(d).

, React- , . .

, . , . , .

, , , . , , . UI , , .

( React Native) API, : requestIdleCallback , requestAnimationFrame . , API . , .

, , ? , ?

React Fiber. , React-. .

, . .

, . .

.

, JS-, , .

, . ( ):

type key

type key , React-. , , .

type . , type . - (div, span ), type .

, type ( v = f(d)), .

type, key , .

child sibling

.

child () , render . :

function Parent() {    return <Child />}

, Child - Parent.

sibling ( ) , render :

function Parent() {    return [<Child1 />, <Child2 />]}

child . , Child1 - Parent, Child2 - (sibling) Child1.

, - .

return

return , . , , . .

, return . , Child1 Child2 return Parent.

pendingProps memoizedProps

, (props) . pendingProps , memoizedProps .

pendingProps memoizedProps, , , .

pendingWorkPriority

. ReactPriorityLevel , .

NoWork, , . , , , :

function matchesPriority(fiber, priority) {    return fiber.pendingWorkPriority !== 0 &&        fiber.pendingWorkPriority <= priority} 

, . .

alternate,

.

. , .

: , .

(alternate) , .

cloneFiber. , , cloneFiber , , .

, , .

output,

-

- . - (, div, span ). JSX, .

, .

, -. , .

, , . .

, , . . :

  • .
  • .
  • , .
  • .
  • ( ).
  • .

What's Next for React (ReactNext 2016)


Original Link: https://dev.to/jennypollard/chto-takoie-react-fiber-react-fiber-architecture-2cho

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To