Twitter | Search | |
Sunil Pai
ok so - I took dan's classes/hooks code from react conf, blacked out the 'unnecessary' bits, then colour coded bits by 'concern'. so much nicer. the effect is amplified in more complex components, where concerns are split and mixed across lifecycle methods.
Reply Retweet Like More
MICHAEL JACKS😅N Oct 28
Replying to @threepointone
Love this visualization 😍
Reply Retweet Like
Sunil Pai Oct 28
Replying to @mjackson
Thank you! Been thinking about it for a while and figured I’d just try it with ms word ha
Reply Retweet Like
Rick Hanlon Oct 28
Replying to @threepointone
So dope Do you think the use* methods should be blacked out on the right?
Reply Retweet Like
Marvin Hagemeister ⚛ Oct 28
Replying to @threepointone
That's an awesome way to visualise why hooks are a huge step forward👍💯 So simple and effective!
Reply Retweet Like
Ryan Florence Oct 28
Replying to @threepointone
I was going to make an animation like this for my talk but couldn’t find a good spot for it. So cool to see here!
Reply Retweet Like
Florian Rival Oct 28
Replying to @threepointone @rauchg
Nice way of seeing things, love it!
Reply Retweet Like
Ryan Florence Oct 28
Replying to @threepointone
(Thought of it after seeing that atlassian JIRA redesign gif, that was genius.)
Reply Retweet Like
Sunil Pai Oct 28
Replying to @rickhanlonii
Thanks! I thought about it, and think it’s essential complexity, just verbose. Just like setState. I could be wrong ofc
Reply Retweet Like
Sunil Pai Oct 28
Replying to @ryanflorence
Thank you! Haha I was thinking of doing an animation too but it seemed like too much work on a Sunday, so ms word it is :)
Reply Retweet Like
Sunil Pai Oct 28
Replying to @ryanflorence
I have not seen this :/
Reply Retweet Like
Sunil Pai Oct 28
Replying to @Florianrival @rauchg
🍻
Reply Retweet Like
Ryan Florence Oct 28
Replying to @threepointone
Lemme find it, it’s really cool.
Reply Retweet Like
Ryan Florence Oct 28
Replying to @threepointone
Reply Retweet Like
Robin Malfait Oct 28
I think that everything that goes away is marked as black, therefore removing the useMethods should not be black, maybe another color to showcase what's new do, like purple.
Reply Retweet Like
Sunil Pai Oct 28
Replying to @ryanflorence
Oh goodness that’s great
Reply Retweet Like
Sunil Pai Oct 28
Yeah that could work well
Reply Retweet Like
Rick Hanlon Oct 28
Replying to @threepointone
Makes sense it's definitely essential, though in my mind they're similar to the lifecycle method names on the left Selfishly if those were blacked out it would drive home a different point I like: Hooks are v close to the lower bound to do this work (i.e. with no extra code)
Reply Retweet Like
Sunil Pai Oct 28
Replying to @rickhanlonii
Yeah I liked the purpling suggestion too. But I’ll probably just black it out next time
Reply Retweet Like
Donald Pipowitch Oct 28
Replying to @threepointone
Great overview 👍
Reply Retweet Like