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

consider using react-walk-tree #102

Closed
alidcast opened this issue Jun 20, 2018 · 7 comments
Closed

consider using react-walk-tree #102

alidcast opened this issue Jun 20, 2018 · 7 comments

Comments

@alidcast
Copy link

Hey, is there a reason you didn't use react-walk-tree for this module?

The reason I ask is that I'm considering using this module for code splitting, but still need to implement some version of Nextjs getInitialProps.

By using same module, it results in less code to bundle and maintain so wondering if there's a reason you didn't use it

Thanks

@theKashey
Copy link
Collaborator

react-walk-tree was broken for a long time, and last suspense related changes are not supported by it.

@gregberge
Copy link
Owner

I think about extracting the walk tree from this package, it should be the work of React Apollo (see apollographql/react-apollo#1937) but they seem to not care about it.

@alidcast
Copy link
Author

alidcast commented Jun 21, 2018

oh wow just learned about React Suspense

So would its release make Loadable components and other code splitting libraries unnecessary?

if not, @neoziro are you still considering extracting logic yourself? I believe that's where you left off in React issue so not sure if anything has changed since

@theKashey
Copy link
Collaborator

So would its release make Loadable components and other code splitting libraries unnecessary?

No, suspense is about "waiting" for some things to be done, and loadable components utilizes suspense underneath to wait for component to be loaded, or inform you about that event.

See https://twitter.com/acdlite/status/1007062696141787136

@alidcast
Copy link
Author

btw, as of 2 days ago react-walker-tree (v4.1.0) supports React.Context API

@gregberge
Copy link
Owner

I am thinking about a new version that will work without tree traversing. For now, I prefer to keep it like that but thanks for the suggestion!

@alidcast
Copy link
Author

@neoziro I'd love to know more. I'm working on a SSR framework for React that uses Parcel and loadable-components. I'll release it next week but repo is up at https://github.com/alidcastano/rogue.

Right now I'm using react-walk-tree to getInitialProps but would be great to know how you plan on doing this to have a compatible solution on my end, thanks!

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

No branches or pull requests

3 participants