What does the concise React version look like?
-
-
-
Replying to @FezVrasta @Rich_Harris and
Or alsopic.twitter.com/TAGgW56yqX
1 reply 0 retweets 5 likes -
Replying to @FezVrasta @scotch_io and
Nice code golfing. You gonna pretend that's idiomatic?!
3 replies 0 retweets 11 likes -
Replying to @Rich_Harris @scotch_io and
Honestly. Yes. Way clearer than some template magic syntax for sure.
1 reply 0 retweets 6 likes -
Replying to @FezVrasta @scotch_io and
If you used destructuring like that in code I was reviewing it damn sure wouldn't be getting merged! With or without the bug you introduced
1 reply 0 retweets 10 likes -
Replying to @Rich_Harris @FezVrasta and
onChange={(({ target: { value } }) => setA(value))} is too much for you to merge? For real? oh sorry - the "bug" onChange={(({ target: { value } }) => setA(+value))} fixed that, too (as though anyone would rely on client-side data cleaning, and not handle server side).
4 replies 0 retweets 4 likes -
Replying to @AdamRackis @Rich_Harris and
There's a lot of superfluous syntax there, some of it due to JSX. Also don't really understand what the value is in using destructuring if it's clear to not use it at all, eg: onChange={(event) => setA(+http://event.target .value))
2 replies 0 retweets 2 likes -
Replying to @sebmck @Rich_Harris and
Adam Rackis Retweeted Adam Rackis
Me too! Destructuring wouldn't be my first choice, I just don't think it's a big deal.https://twitter.com/AdamRackis/status/1120833140694536192 …
Adam Rackis added,
1 reply 0 retweets 2 likes
I had to stare at that code for a bit until I could decipher what was going on. I'd like think I'm pretty familiar with JS syntax too. React code is starting to look like LISP.
-
-
Replying to @sebmck @AdamRackis and
0 replies 0 retweets 2 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 
