-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Migrate to React 16 #1967
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
Comments
@EugeneHlushko Preact works just fine. You have to tune it like this: https://github.com/antwarjs/antwar/blob/master/smoketest/antwar.config.js#L9 . See the smoketest example configuration. |
But do we still need it when react's async rendering lands? 16.3 RC is already on npm so that might be too soon. P.S. i saw in one of your commits where you commented out |
@EugeneHlushko I had some troubles with Preact until I realized I have to implement that render hook. I would go with Preact for now given it's so much smaller than React. I wouldn't worry about the new async rendering semantics yet. I would optimize for bundle size. |
@bebraw I am not totally convinced that 32.6 kb GZ react 16.2 vs 3kb GZ preact makes difference when we include avatar based widgets on pages where each picture can be 4-32kb and the content is responsive on initial render as antwar already generated the markup during build. As github pages does GZ by default i would still try to move out for React 16, which might also solve our current issue with But i can still do alias after the migration if everyone is up for Preact in this particular website scenario |
Ok. Even better, we should find a neat way to separate React and react-dom to a shared vendor bundle. I have a feeling it's quite easy to pull this off through webpack configuration ( If we do this, the size difference doesn't matter as the outcome is more or less the same. |
Or that might be a |
@EugeneHlushko That's what I mean. It's good to remember Antwar bundles twice which makes this a little tricky. The first phase generates a bundle it calls in different ways to render individual pages. During this second phase it bundles the interactive bits. Maybe |
ok thats why you mentioned externals, didnt realize at the start 👍 i will ping you when PR is up if you dont mind @bebraw |
@EugeneHlushko Ok. Open an issue at Antwar repo and I'll try to setup a small example to follow. |
done in |
@EugeneHlushko |
@montogeek it says ^16.2.0 for both |
@EugeneHlushko Correct, no idea what I read last night |
Migrating to latest react increases overall website performance and eases the further maintainability of the project. Also We possibly have an issue with Preact event system mock which sometimes doesn't fire
onError
for the image see #1924Considering overall bundle size reductions and GZIP it doesnt make much sense to keep preact, also @bebraw dropper preact in antwar's latest versions as it wasnt working with webpack4 setup.
Dependency: #1964
As soon as #1964 is finalized and merged i can do the migration
UPDATE: It seems there is a branch already which does the migration, this is on hold until things getting clearer, see
rebuild
branch for more info.The text was updated successfully, but these errors were encountered: