Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support react-optimize #1073

Open
cia48621793 opened this issue May 12, 2017 · 8 comments
Open

Support react-optimize #1073

cia48621793 opened this issue May 12, 2017 · 8 comments

Comments

@cia48621793
Copy link

https://github.com/thejameskyle/babel-react-optimize

transform-react-inline-elements would be a little bit problematic for Inferno I guess?

@trueadm
Copy link
Member

trueadm commented May 12, 2017

@cia48621793 it wouldn't give Inferno any performance benefit as Inferno's VNodes are not immutable.

@Havunen
Copy link
Member

Havunen commented May 12, 2017

There are plans to make inferno vNodes immutable in v4.

@Havunen Havunen added the v4 label May 12, 2017
@LukeSheard LukeSheard removed the v5 label Jun 10, 2017
@LukeSheard LukeSheard modified the milestones: 5.0, 4.0 Jun 10, 2017
@Havunen
Copy link
Member

Havunen commented Dec 15, 2017

This will not happen for v4. Moving target forward.

@Havunen Havunen modified the milestones: 4.0, Future Dec 15, 2017
@artembatura
Copy link

@Havunen What about immutability of VNode in Inferno 6.0?

@Havunen
Copy link
Member

Havunen commented Oct 14, 2018

@artemirq If vNode is hoisted and used in one or more places it will be cloned, Im not sure If it gains any performance that way

@artembatura
Copy link

@Havunen What you think about future React changes with respect to Inferno? These are:

  1. Async rendering
  2. Time slicing and Suspense API (React.Lazy too)
  3. Profiler API

@Havunen
Copy link
Member

Havunen commented Oct 20, 2018

@artemirq

Async rendering and Time slicing and Suspense API (React.Lazy too)

I think this is interesting concept, I have not read enough about it to form opinion yet. I believe async rendering also comes with priority queues or something similar. Pushing everything to event queue wouldn't probably make much sense otherwise.

I don't know if managing priority queue is worth the cost of just diffing through, because inferno diff is really fast.

Profiler API

I think we could just add this into Inferno. It should be straightforward unless there is some catch that I'm not aware of.

@artembatura
Copy link

@Havunen Hey! Check it out https://twitter.com/reactjs/status/1054886083475857408

React.memo
https://scotch.io/tutorials/react-166-reactmemo-for-functional-components-rendering-control

React.Lazy
https://medium.com/@vigzmv/react-lazy-what-and-how-to-use-in-your-app-14b416dde8f7

Interesting, for Inferno does need to implement something like React.memo or React.PureComponent?

React.Lazy is very interesting with Suspense API ^o^

@Havunen Havunen removed this from the Future milestone May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants