-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
in-place updates (rendering optimizations) not working for input component #336
Comments
I don't think this is possible in React with how controlled components and stuff interact, luckily the DOM itself already behaves that way when you use the default behavior! Typing in an input only reflects in JS when you bind the These optimizations however should work in Preact 😅 https://codesandbox.io/s/restless-rgb-qvxdhl?file=/src/index.js |
I created a minimal commented react codesandbox to clearly show expected and actual outcome.
I read what you documented about in-place updates but I did not find much information.
Here I can read:
Maybe input's value is not considered to be "a text position" so behavior I experienced is consistent and in that case I would like to ask you if you think you will support in-place update for this in the future;
otherwise, my codesandbox (I left a comment trying to be as clear as possible) shows that when using
<input value={whateverStringSignal}>
, your component will re-render and it cannot count on optimizations.In both cases: is there a way to achieve this with signals (and some custom code maybe) right now?
References:
The text was updated successfully, but these errors were encountered: