Blume suggests a fix for this issue by making each character a React Fragment and assigning it an immutable key. This allows users to select text even as it's streaming in, thereby improving the user experience. A GIF is provided to demonstrate the effectiveness of this solution.
Key takeaways:
- The problem discussed is the disappearance of text selection when a new character is appended to a paragraph node in a streaming text, similar to how ChatGPT works.
- A GIF is provided to demonstrate the issue of losing focus when selecting a paragraph as it's currently streaming in.
- The proposed solution is to make each character a React Fragment and give it an immutable key, which allows text selection even as it's streaming in.
- A GIF is also provided to show how using immutably keyed Fragments fixes this behavior.