Twitter | Search | |
Kent C. Dodds
Making software development more accessible · Husband, Father, Mormon, Teacher, OSS, GDE, · ·
58,492
Tweets
588
Following
24,972
Followers
Tweets
Kent C. Dodds 8m
There could easily be one made for karma/pupeteer, or even your new karmatic 😉
Reply Retweet Like
Kent C. Dodds 9m
So there's one for ESLint, Cypress, mocha, and more!
Reply Retweet Like
Kent C. Dodds 9m
This just allows jest to run whatever you want and you get all of jest's super cool features (watch mode/parallelism/etc).
Reply Retweet Like
Kent C. Dodds 15m
Nope nope nope nope. Look again 😘
Reply Retweet Like
Kent C. Dodds 15m
I can't keep track of you Ryan
Reply Retweet Like
Kent C. Dodds 26m
You could actually use to work with whatever you're using and save yourself a ton of trouble 😉
Reply Retweet Like
Kent C. Dodds retweeted
Andrew Clark 58m
React doesn’t yet have any first-class render prop APIs but that’s likely going to change in a big way. Starting with context API. But we’re really just talking about API patterns so I do think userspace can/should solve it. We don’t like to be too didactic if we can avoid it.
Reply Retweet Like
Kent C. Dodds 2h
Replying to @FWeinb @ryanflorence
I use the render prop mostly because told me in his experience people gave him fewer weird faces when he was teaching it 🤷‍♂️ I pretty much don't care either way though...
Reply Retweet Like
Kent C. Dodds 2h
Replying to @wesbos @jhooks
Don't tell anyone but I tried and it didn't work :-(
Reply Retweet Like
Kent C. Dodds 2h
That's a render prop!
Reply Retweet Like
Kent C. Dodds 2h
Replying to @jhooks @wesbos
Hopefully I'll be able to get my company's VPN to stop blocking it then... :-/
Reply Retweet Like
Kent C. Dodds 2h
Replying to @buulam_dev @getify
Not quite though right? Coverage tools will record that the else branch on the last if wasn't covered. So that's 75% branch coverage. Unless I'm misunderstanding you 🤔
Reply Retweet Like
Kent C. Dodds 2h
Replying to @jkup
Reply Retweet Like
Kent C. Dodds 2h
Replying to @iddan @reactjs
No worries :) Sometimes it's hard to remember that it's just JavaScript 😉
Reply Retweet Like
Kent C. Dodds 3h
When looking at JSX, don't forget it's actually JavaScript and you can do things like make stuff variables and stuff.
Reply Retweet Like
Kent C. Dodds 3h
Replying to @iddan @reactjs
Then make it a class field class A extends Component { renderThing = () => {/* I haz this.props */}, render() { <Thing render={this.renderThing} /> } }
Reply Retweet Like
Kent C. Dodds 3h
Meh, not worth the maintenance cost IMO. People can shoot themselves in the foot on their own machine too...
Reply Retweet Like
Kent C. Dodds 3h
Think of it like CodePen or CodeSandbox, but for the babel repl...
Reply Retweet Like
Kent C. Dodds 3h
Replying to @iddan @reactjs
Simple. Extract the function: // ... in render function <Thing render={() => {}} /> Change that to: const render = () => {} // in render function <Thing render={render} /> It's just JavaScript...
Reply Retweet Like
Kent C. Dodds retweeted
Henry Zhu 3h
So started a WIP PR to allow importing any babel plugin from npm into the REPL! As a test I tried running with babel-plugin-emotion and babel-plugin-styled-components (I think they need to start with babel-plugin* atm?)
Reply Retweet Like