Skip to content

feat: add formal support for extract/hydrate of reforge config#7

Merged
mjfaga merged 1 commit intomainfrom
mfaga-match-prefab
Sep 3, 2025
Merged

feat: add formal support for extract/hydrate of reforge config#7
mjfaga merged 1 commit intomainfrom
mfaga-match-prefab

Conversation

@mjfaga
Copy link
Copy Markdown
Collaborator

@mjfaga mjfaga commented Sep 3, 2025

Introduces a public API for client cache extractions + re-hydration. This will primarily be used in FE apps that need to support server-side rendering in order to allow them to take advantage of a server-call to hydrate the prefab client using a blocking init call, serialize the loaded configuration with extract, serialize it into the pages initial payload, and then re-hydrate from that payload on the client without having to explicitly reload the entire payload with another blocking call on the client.

This pattern is common in the SSR world with most other stateful client libraries that retrieve data from APIs that is re-used on the client during the react re-hydration cycle to avoid firing duplicate requests client-side to resolve the same exact data set.

Based on prefab-cloud/prefab-cloud-js#73

@mjfaga mjfaga force-pushed the mfaga-match-prefab branch 3 times, most recently from 9c5be41 to 363f1d4 Compare September 3, 2025 01:22
@mjfaga mjfaga force-pushed the mfaga-match-prefab branch from 363f1d4 to d241f14 Compare September 3, 2025 01:22
Copy link
Copy Markdown
Contributor

@jdwyah jdwyah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

@mjfaga mjfaga merged commit 1be9383 into main Sep 3, 2025
1 check passed
@mjfaga mjfaga deleted the mfaga-match-prefab branch September 3, 2025 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants