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

Extension to 'Differences to React' #32

Closed
NickColley opened this issue Jan 29, 2016 · 2 comments
Closed

Extension to 'Differences to React' #32

NickColley opened this issue Jan 29, 2016 · 2 comments
Labels

Comments

@NickColley
Copy link

This project is really interesting thanks for sharing,

I've read through https://github.com/developit/preact/wiki/Differences-to-React and I'm really curious how this can be so much smaller than React, you mentioned you couldn't contribute upstream to React, what do you think React could do to make their build sizes smaller?

What are the biggest parts of React that you were able to avoid?

@developit
Copy link
Member

Preact does not even attempt to support rendering targets other than the DOM, which removes a lot of complexity. The diff algorithm is far less complex than React's, which amounts to a fair bit of code (their diff is stellar). Lastly, Preact does not include an event implementation of its own, it simply uses the browser's. Those three things mean there is a lot less indirection in the codebase, with fewer layers of abstraction (ex: creating an element is one function).

@NickColley
Copy link
Author

@developit thanks for replying that is interesting to know, I'll close this out! 👍 :D

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

No branches or pull requests

2 participants