[Feature?]: Broaden out event replaying for commonly used input field pattern #1849
Closed
2 tasks done
Labels
enhancement
New feature or request
Milestone
Duplicates
Latest version
Summary 💡
On the SSR'd page from solid-js there is a short JS snippet which writes all events into a global object. These are later replayed once the page has hydrated. The reason for doing this, I assume, is that user input given while the page is loading isn't lost.
However, it doesn't seem like that works correctly with a very commonly used input field pattern.
Examples 🌈
According to me this is a very common pattern to do when having an input field that's synced with a signal value.
It seems like that having
value={name()}
empties the input field before the input events are replayed as the page hydrates - or something else is happening, that leads to the user input to be cleared as the page loads.My expected behavior is that text entered before the page is hydrated is retained and written to the signal.
Motivation 🔦
Give great UX to my users
The text was updated successfully, but these errors were encountered: