-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Use Redux for internal state plus add prototype for data hot reloading fixes #777 #788
Merged
Conversation
This file contains 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
The idea for how to do things was taken from compilers but since we're not actually parsing syntax into a tree, using AST terminology is confusing. DataTree seems like a more sensible name.
…to make same as browser/ssr api signature
Deploy preview ready! Built with commit 9dd9548 |
Deploy preview ready! Built with commit 9dd9548 |
mwfrost
pushed a commit
to mwfrost/gatsby
that referenced
this pull request
Apr 20, 2023
…fixes gatsbyjs#777 (gatsbyjs#788) * Use DataTree instead of Abstract Syntax Tree The idea for how to do things was taken from compilers but since we're not actually parsing syntax into a tree, using AST terminology is confusing. DataTree seems like a more sensible name. * Add a watch command for all packages and update contributing instructions * Add trailing slash when creating script tags for prefixed sites * Add redux, convert all globals except pages to use it * Add more tests + convert node api signature to (args, pluginOptions) to make same as browser/ssr api signature * Use Redux for managing data nodes + initial rough implemenation of hot reloading * Move raw action dispatching to action creator * Add nodes tests * Update windows docs * Update CONTRIBUTING.md * Somewhat reliable draining * Upgrade gatsbygram for PR * Up sites to latest canary
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 is a noisy PR as there's the Redux refactor that touches almost everything as well as several API name changes.
I'm most interested in a review of how I setup Redux but any other thoughts would be great as well.
I have several additional things I need to refactor after after this lands but wanted to get something in earlier than later rather than create an even larger PR.
In addition to the data hot reloading added in this PR, this sets the stage for caching data and queries between builds so restarting the gatsby dev server will be much faster.