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

State platform improvements #242

Merged
merged 10 commits into from
Nov 29, 2022
Merged

State platform improvements #242

merged 10 commits into from
Nov 29, 2022

Conversation

arctic-hen7
Copy link
Member

@arctic-hen7 arctic-hen7 commented Nov 28, 2022

This is a super-PR for a number of major improvements to the Perseus state platform, including:

  • Suspended state
  • Delayed state [REMOVED]
  • Request-time global state, and amalgamation of that with build-time global state

Together, especially with the first two, these should be a major improvement to the ergonomics of working with complex state, especially on the browser-side! The aim of these features is to ensure that we don't have to manually invoke spawn_local_scoped or the like, rather using asynchronous handler functions that are automatically called in the browser.

Closes #150 and closes #225.

This should facilitate error handling very effectively in suspended state.
This needs a lot of cleaning up, but it works!
@arctic-hen7 arctic-hen7 mentioned this pull request Nov 28, 2022
@arctic-hen7
Copy link
Member Author

As per this comment, delayed state is being removed from this PR.

BREAKING CHANGE: global state is now built per-locale, and build state
functions therefore take a `locale: String` argument now
BREAKING CHANGE: functional plugin actions for failing global state have
been removed due to alternate generation systems (you should hook into
failed builds instead)
`NotFound` errors were being reported incorrectly, meaning apps not
using global state couldn't be compiled.
@arctic-hen7 arctic-hen7 marked this pull request as ready for review November 29, 2022 19:54
@arctic-hen7 arctic-hen7 merged commit c174a69 into main Nov 29, 2022
@arctic-hen7 arctic-hen7 deleted the feat-browser-state-platform branch November 29, 2022 21:28
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

Successfully merging this pull request may close these issues.

Suspense fails State platform v2 (asynchronicity and browser-side state mutation)
1 participant