So I decided to give some love to my blog again since I had to migrate from PHP anyway. Do people still read blogs? 😅
crocodillon.com/blog/getting…
1
1
179
How would you remember a value that shouldn't change at all during the lifetime of a React component? `useMemo` doesn't give that guarantee.
const x = useRef(new X())
const [x] = useState(() => new X())
Something (perhaps more obvious) I completely missed? cc @dan_abramov
1
My wish for JavaScript in 2021; the nullish default operator. Useful for functions with multiple optional arguments or when dealing with optional props in React components where passing null instead of undefined is a common practice 😄
@carbon_app
1
Examples are often easier to read than documentation. Thanks to this example I now sort of understand React hooks 😅 Though... stateful functional components? o_0
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.
2
Still my favorite bookmark to get rid of `position: fixed` elements blocking a page:
javascript:(function(){document.body.style.transform='translate(0,0)'}());
Semi-mocked React context for use in your (Enzyme) component tests. Good idea or not? cc @dan_abramov
I feel like a noob but why don't <a> and <button> elements, styled identically, align?
codepen.io/CrocoDillon/pen/g…
1
Been a while since I made something I'm proud of on @CodePen... this is a component that highlights certain tokens in an (search query) input (in this case OR and AND but can be easily expanded) 🙃
codepen.io/CrocoDillon/pen/m…
2
Material Design finally has a reference implementation (including web), been waiting for this!
material.io/components/
Because I'm better at coding than drawing... "Declarative SVG paths using React", interesting or terrible idea?
PoC: codepen.io/CrocoDillon/pen/M…
one I'm still guilty of, reinventing the wheel (or trying to at least). You learn lots of stuff but productivity sucks.
1
100% code coverage requirement for tests, unit testing implementation details, flow typing all the things, mixins, global css.
1
maybe because the voice of people who complain is so much louder than the voice of people who are satisfied.
2
Dillon de Voor retweeted
Yelp CEO angry that Google will downrank his shitty "Download our app" interstitial that gets in the way of content seroundtable.com/yelp-ceo-on…
`document.all` is weird (one of those “what the flux?” browser quirks)
codepen.io/CrocoDillon/pen/y…
Nice visualization of how distributed consensus work (write concern, replication etc)
thesecretlivesofdata.com/raf…
“I Peeked Into My Node_Modules Directory And You Won’t Believe What Happened Next”, awesome read! ;D
medium.com/friendship-dot-js…
Dillon de Voor retweeted
We just shipped v15.3.0 with React.PureComponent & react-test-renderer! (docs coming soon)
Full changelog: github.com/facebook/react/re…








