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

Allow different serialisation implementation to be used with prepared states #2701

Open
futursolo opened this issue May 24, 2022 · 1 comment
Labels
A-yew Area: The main yew crate

Comments

@futursolo
Copy link
Member

Currently, prepared states are implemented with bincode + base64.
This implementation is selected as it results in the smallest artifact of both hydration enabled wasm file and html file.

However, sometimes it may make sense to swap this for another serde implementation such as when serde_json is already included.
We should provide a way to replace the implementation.

@futursolo futursolo added the A-yew Area: The main yew crate label May 24, 2022
@hamza1311
Copy link
Member

One way to provide this implementation is similar to how global allocator works:

// pseudocode~ish
#[yew::serializor]
static SERIALIZOR: Serializor = Serializor::INIT;

I'm not entirely sure if that's possible though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-yew Area: The main yew crate
Projects
None yet
Development

No branches or pull requests

2 participants