Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Beyond (P)react 16 #468

Closed
RoyalIcing opened this issue Mar 5, 2018 · 4 comments
Closed

Beyond (P)react 16 #468

RoyalIcing opened this issue Mar 5, 2018 · 4 comments

Comments

@RoyalIcing
Copy link

With the upcoming changes in a future version of React, I was wondering at this early stage what direction Preact will likely take?

Is Preact likely to to adopt these new ‘time slicing’ and ‘suspense’ capabilities, in whatever form they will eventually come? Or is there value in keeping to a simpler API?

P.S. I couldn’t find mention of this yet, so let me know if there is already an issue on this somewhere.

@thangchung
Copy link

+1

@developit
Copy link
Member

This has been an ongoing discussion amongst the various people who contribute to Preact. Obviously a good chunk of the value of Preact (at least for those using preact-compat) is that it's syntactically the same as React. It seems like we'll have to support the much more nuanced behavior of React 16+ in some form, whether that is through -compat or by changing Preact itself remains to be seen.

There has been some work going on to adopt a few of the newer APIs (getDerivedStateFromProps(), componentDidCatch(), etc) - these are things that are independently useful and don't rely on React's internal rendering details.

The "suspense" stuff seems like it will be somewhat of a freebie once we have patched in support for componentDidCatch in Preact's core.

"Time slicing" I assume refers to React's async rendering. We've been been investigating async rendering for a year or two - there's some decent movement on that front in various places, but personally I've been pulled away for a bit and haven't had time to move it forward much.

@developit
Copy link
Member

See also #432 (comment)

@marvinhagemeister
Copy link
Member

With Preact X we ship an early preview of Suspense. It's not production ready yet. Time slicing is something we'll likely not adopt. It sounds cool on paper, but the benefits are a lot less visible in the real world. On top of that it's a very complex concept to implement which makes us even more skeptical given the little benefit we'd get from it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants