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

Question: Refactor library with hooks #201

Open
jaybe78 opened this issue Nov 13, 2019 · 6 comments
Open

Question: Refactor library with hooks #201

jaybe78 opened this issue Nov 13, 2019 · 6 comments

Comments

@jaybe78
Copy link

jaybe78 commented Nov 13, 2019

Hi @ScriptedAlchemy,

Any plan to use hooks instead of HOCs in the library ?

@ScriptedAlchemy
Copy link
Collaborator

Yeah, I'm working on another project which is very similar. It uses hooks, once I finalize it ill backport the mechanism to RUC

@jaybe78
Copy link
Author

jaybe78 commented Nov 13, 2019

@ScriptedAlchemy I'll be more than happy to contribute if you need help

@ScriptedAlchemy
Copy link
Collaborator

I wouldn’t mind some assistance giving it updates. So if you’re keen I’ll gladly accept a pr!

@ScriptedAlchemy
Copy link
Collaborator

Moving to hooks is tricky because the class based system lets me execute static’s ahead of time.

@jaybe78
Copy link
Author

jaybe78 commented Jan 31, 2020

Do preload and prelodWeak really matters ?
The docs says that those statics can be called if there's a likelihood modules will show up soon.
To be honest I've not used those in my project, I'm mainly interested in code splitting and requiring module asynchronously. That's only from my point of view though, but I don't think that prevents us from building from scratch a new implementation of react universal with hooks.

@ScriptedAlchemy
Copy link
Collaborator

Those were used previously but no they are no popular features. It could be possible to further upgrade. If you’re interested in getting something started. I’ll likely pick up the PR and help. Either way I need the suspense part. I’ve got a hooks based async component in webpack-external-import. Take a look at the src/react file. That might be able to be ported over

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

2 participants