grncdr / react-async-input

Inputs that behave properly with async set{State,Props} calls
5 stars 2 forks source link

Update asyncInput to work with modern React #3

Closed drd closed 9 years ago

drd commented 9 years ago

Hi! I've updated the module to work with React 0.12 and higher. Glad this was here. I'd be happy to maintain the package going forward if you're done with it.

grncdr commented 9 years ago

first, awesome! thanks so much. Let me know what your npm username is and I will add you as a maintainer. Then I'd ask that you update the package.json to point at your fork.

drd commented 9 years ago

Hi Stephen! Glad to help. My npm username is eric.oconnell (https://www.npmjs.com/~eric.oconnell https://www.npmjs.com/~eric.oconnell). I’ll be happy to update package.json.

It sounds like you don’t use this still, but in case you’re interested, there is still a race condition in this code… typing very quickly when the selection is not at the end of the input will eventually cause the controlled value and the input value to skew, resulting in very strange behavior. Here are a couple of fiddles that address the problem: http://jsfiddle.net/yrmmbjm1/1/ and http://jsfiddle.net/yrmmbjm1/4/.

On Mar 10, 2015, at 6:55 AM, Stephen Sugden notifications@github.com wrote:

first, awesome! thanks so much. Let me know what your npm username is and I will add you as a maintainer. Then I'd ask that you update the package.json to point at your fork.

— Reply to this email directly or view it on GitHub https://github.com/grncdr/react-async-input/pull/3#issuecomment-78057085.

grncdr commented 9 years ago

Hi Eric, you're now the maintainer on npm. :tada:

It sounds like you don’t use this still, but in case you’re interested, there is still a race condition in this code… typing very quickly when the selection is not at the end of the input will eventually cause the controlled value and the input value to skew, resulting in very strange behavior. Here are a couple of fiddles that address the problem: http://jsfiddle.net/yrmmbjm1/1/ and http://jsfiddle.net/yrmmbjm1/4/.

So I think this was never an issue for me because I was using a single "state" object in my app that would re-render the entire virtual dom tree whenever something updated.