Update islands example to Leptos v0.7 #271
Draft
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.
Hello!
Sorry for the delay in getting back to this, I was away. I noticed in issue #263 that the islands example was removed after the update to Leptos v0.7.
This pull request is an attempt to reintroduce the islands example. However, I'm encountering a recurring issue. The language can be changed via the header, and the URL updates accordingly, but the UI does not reflect the change dynamically. Manually reloading the page after changing the language causes the new language to display correctly. This appears to be the same issue we encountered previously.
Our solution was to reload programmatically using
window().location().reload().unwrap()
after the language change:But this time, it resets the URL parameter to the original language instead of preserving the change.
I’m considering whether we should shift away from using URL parameters for language selection and rely solely on cookies. I experimented with this approach, and the cookie updates correctly when the language changes. However, even with the cookie set to
es
, the page still loads with theen
language.Do you have any insights or suggestions to address these issues?
Thank you for your time and help!