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

Inferno V4 plans #1049

Closed
Havunen opened this issue Apr 26, 2017 · 8 comments
Closed

Inferno V4 plans #1049

Havunen opened this issue Apr 26, 2017 · 8 comments

Comments

@Havunen
Copy link
Member

Havunen commented Apr 26, 2017

I created this issue with the purpose of starting discussion on what new functionality we should bring in the next major release.

Remove normalization

We will at least improve performance even further, this will be done by removing normalization. Main reason behind this decision is that most of the community don't know or don't care what it is and how or when it can be disabled. This should give major performance increases Server side, because most of the time it was unnecessary work to normalize there. Removing normalization will also make codebase smaller in size. By removing normalization we will make sure code runs faster when not using it so most of the community / inferno users will benefit from this change.

Component root level arrays

Another larger task is to start supporting Array root nodes from Components. So you could write code like this:

class TableRow extends Component {
    render() {
        return [<td>1</td>, <td>2</td>];
    }
}

This has been probably the most wanted single feature, it allows developers to be more creative than before and not bloating the DOM with unnecessary divs.

Force update for functional components?

There has been discussion about implementing some way of forceUpdating stateless components. This would reduce overhead and make integration with Mobx and other state management frameworks cleaner. This idea still needs more planning & designing.

What else would you like to see in the next major version of Inferno?

@Havunen Havunen changed the title Inferno v4 plans INFERNO v4 plans Apr 26, 2017
@Havunen Havunen changed the title INFERNO v4 plans Inferno V4 plans Apr 26, 2017
@Ashot-KR
Copy link
Contributor

How about #928? i'd like to use inferno as es2015 modules in my projects.

Component root level arrays

I'm in love with it already

@oreqizer
Copy link
Contributor

Flow types in flow-typed

@kurdin
Copy link
Contributor

kurdin commented May 2, 2017

Can we please add replace method on component mount / update. No diffs, no extra code to run, just create new DOM and replace old with new on element. Currently some workaround on update can be done to achieve this, we can supply new key attribute with something like { Date.now() } and inferno will create new component on each render. I would like to do component update with DOM replace method instead of diffing. Same on mount, currently there is no way to mount new component without hydration. Let say I want to create HTML on server with different option (more attributes for google data tags or no images ) than for browser users. Why waste time to diff HTML from server and client on mount, sometimes just replacing SSR HTML with client generated code makes more sense.

@ghost
Copy link

ghost commented May 10, 2017

What i'd like to see, tough it's not a feautre, is to have separate repository for each inferno project. So split the core, the router, the compat etc, into different repositories, as it is on npm. I think issues would be more focused on the specific problem inside of the specific part of inferno, and the code would be easier to find(not that now it's hard, don't get me wrong). If there's a reason why you're keeping all the code inside one repository I'd like to know and we could discuss the pros and cons

@longlho
Copy link
Member

longlho commented May 10, 2017

@Luke123443 the reasons are pretty much summed up here:
https://danluu.com/monorepo/
https://medium.com/@bebraw/the-case-for-monorepos-907c1361708a
https://www.google.com/#q=monorepo

@Havunen
Copy link
Member Author

Havunen commented May 10, 2017

@kurdin yes. I think we could introduce new flag for that purpose, something like always re-create ? But there will still be overhead because we need to support lifecycle events. Anyway V4 should make diffing faster because currently Inferno uses keyed algo by default but that is most likely changing in next version.

@Havunen Havunen added the v4 label May 12, 2017
@Havunen Havunen changed the title Inferno V4 plans Inferno V5 plans Jun 2, 2017
@Havunen
Copy link
Member Author

Havunen commented Jun 2, 2017

I'm moving this epic to v5. We are trying to create one more fully stable major version branch before going into topics discussed in this thread. V4 will be Long Time Support version (1year?) and we will try to minimize the differences to React v15. (fe. setState) Also we are planning to include latest versions of Redux/Mobx integrations with release v4 as well as go through all plugins under InfernoJS organization and update them to match upcoming v4.

@LukeSheard LukeSheard removed the v5 label Jun 10, 2017
@LukeSheard LukeSheard modified the milestones: 5.0, 4.0 Jun 10, 2017
@Havunen Havunen changed the title Inferno V5 plans Inferno V4 plans Jun 16, 2017
@Havunen
Copy link
Member Author

Havunen commented Dec 18, 2017

I'm closing this as V4 is moving to testing only phase soon.

Status of topics discussed in this thread:

  • normalization is improved a lot ( SSR and JSX )
  • VNodeFlags.Replace is implemented and will ship in V4 @kurdin
    -Root level arrays most likely will not make it to V4.
  • We will introduce 'module' entry point again.

@Havunen Havunen closed this as completed Dec 18, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

6 participants