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

Writing full page component #41

Open
naqvitalha opened this issue May 22, 2018 · 8 comments
Open

Writing full page component #41

naqvitalha opened this issue May 22, 2018 · 8 comments

Comments

@naqvitalha
Copy link

We have an exiting PWA, there are some routes that render components using RNW.

Is it possible to write an NPM module that is a full page size component and import in an existing PWA and run it using RND?
Or, differently put how to integrate with an existing PWA such that few pages render with RND?

@vincentriemer
Copy link
Owner

While it's certainly a possibility, due to the massive bundle sizes produced from this project I don't think it's going to be a priority to support incremental adoption for the time being.

@naqvitalha
Copy link
Author

How big are the bundle sizes right now?

@vincentriemer
Copy link
Owner

Hello world clocks in at around....500kb....gzipped (lol)

@drejohnson
Copy link

Will bundle sizes eventually be smaller?

@vincentriemer
Copy link
Owner

Hopefully yeah, I think the biggest win could come from metro adding DCE/tree shaking, but it would be also cool if we could investigate if it would be possible to do tree shaking across a web worker

@naqvitalha
Copy link
Author

Why not make the production build with webpack? Dev experience can still be great using metro.

@vincentriemer
Copy link
Owner

vincentriemer commented May 25, 2018

Webpack would need to understand the haste @providesModule annotations because that's how this project selectively overrides core components.

EDIT: Not to mention the asset loading behavior which is very react-native/metro specific

@drejohnson
Copy link

Found this tool for building react-native apps with webpack: https://github.com/callstack/haul

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

No branches or pull requests

3 participants