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

Only for Blaze? #27

Open
merlinstardust opened this issue Jun 29, 2018 · 2 comments
Open

Only for Blaze? #27

merlinstardust opened this issue Jun 29, 2018 · 2 comments

Comments

@merlinstardust
Copy link

Does this only work for Blaze or will it work for React as well?

@veered
Copy link
Member

veered commented Jul 2, 2018

The server-side code re-evaluation is independent of backend, but the front-end code re-evaluation only support Blaze.

Me and @theodorDiaconu have spent a fair amount of time trying to figure out how to get it working for React, but afaict there is no simple solution.

The primary problem is that React components aren't globally declared. You define a React component in some file and then import that React component into another file. So re-evaluating a single file in isolation doesn't make sense, you have to re-evaluate the whole graph of dependencies that depend on that component.

My knowledge of React is super super limited, so maybe there's a way around this. I would really love to support React

@theodorDiaconu
Copy link

theodorDiaconu commented Jul 5, 2018

The problem of globally declared components aka Component Registry (concept found in https://github.com/cult-of-coders/react-molecule) is solved, however the solution for React would imply that you use molecule's registry for all your components. If you do that, something like reval can be easily done.

Currently the effort put into achieving something like this implies a new way of architecting your app which implies large refactor efforts. It's currently not worth it.

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