Only renderers should depend on reconciler code#11281
Merged
gaearon merged 2 commits intofacebook:masterfrom Oct 19, 2017
Merged
Only renderers should depend on reconciler code#11281gaearon merged 2 commits intofacebook:masterfrom
gaearon merged 2 commits intofacebook:masterfrom
Conversation
Collaborator
Author
|
Verified this doesn't change the build except for the comment in the source. |
They share ReactDOMFrameScheduling so I moved it to shared.
Collaborator
Author
|
Pushed an additional fix for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This addresses #11280.
We forbid
TestUtilsandShallowRendererfrom bundling the reconciler code.The build breaks since they depend on some Fiber modules. However those modules happen to be stateless helpers. So I move those to
sharedacknowledging their nature (just likeReactTypeOfWorkalready lives there).We can (and maybe will need to) fix this in a different way by moving them to the reconciler and making them exports on it. Since third-party renderers might need them anyway.
However this is a reasonable solution while we’re untangling dependencies. Again, it doesn’t change how it works—just formally encodes what we already do.
I added some todos for server dependencies on reconciler modules. Should be easy follow up fix.