React: [Umbrella] Releasing Time Slicing

Created on 2 Aug 2018  路  8Comments  路  Source: facebook/react

Let's use this to track what's missing before Time Slicing is usable internally and in open source.
This list is probably very incomplete, feel free to add more.

Initial release (MVP)

Core

Scheduler

  • [ ] Decide on naming (@flarnie, React Core team)
  • [ ] Adding support for priority (@flarnie)

    • May involve bikeshedding, iteration

    • Will require changes to React Fiber Scheduler

    • [ ] Add a fixture showing using JS Scheduler with React and also external JS

  • [ ] Better handle when tab is backgrounded (@flarnie)
  • [ ] Improvements to polyfill for rAF
  • [ ] Integrate and dogfood with internal FB products - see internal task T32773869 (@flarnie)
  • [ ] Create final API which is not renderer-dependent
  • [ ] Make react-dom depend on it, and publish it in open source (@flarnie, others internally)

Related: Suspense Umbrella (https://github.com/facebook/react/issues/13206)

React Core Team Umbrella

Most helpful comment

The unstable_deferredUpdates API is just a placeholder and will be removed. I imagine the actual API we鈥檒l end up with should be renderer-independent.

All 8 comments

Thanks for creating this!
I would change

Figure out if it needs a priority API
to
Implement and try out the priority API

I can pick up that work again next week.

@flarnie Feel free to edit :-)

hi @gaearon, questions:

  1. Is time-slicing a React or ReactDOM specific feature?
  2. Any reason why it's currently part of ReactDOM API as opposed to just another React.Component method (e.g., Component.prototype.deferSetState)?

The unstable_deferredUpdates API is just a placeholder and will be removed. I imagine the actual API we鈥檒l end up with should be renderer-independent.

Will offscreen api work with fragments? Like this

<React.Fragment hidden={!visible}>
  {content}
</React.Fragment>

@TrySound IIRC, React doesn't support any attribute on Fragment except one or two special(I don't remember)?

@NE-SmallTown I know that Fragment supports only key prop. That's why I'm asking. This will be a quite useful feature for example in windowing.

I think this needs updated since the latest release? At least it seems so from https://reactjs.org/blog/2018/10/23/react-v-16-6.html#scheduler-experimental ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hnordt picture hnordt  路  3Comments

bloodyowl picture bloodyowl  路  3Comments

huxiaoqi567 picture huxiaoqi567  路  3Comments

zpao picture zpao  路  3Comments

trusktr picture trusktr  路  3Comments