A basic mental model of TypeScript types.
A side by side comparison of JavaScript code vs Type level code to help you think of the type system as any other programming language.
gist: gist.github.com/anuraghazra/c3…
1/n
The Ultimate #DesignSystems Resources List 🌈
All the relevant, latest resources to help you create your design system. 💥
* Blog posts
* Tools
* Plugins
* Libraries
* List of Design Systems
* Design Tokens
* Slides and videos
* Books
* Conferences
> bit.ly/3JKdefQ
For a very long time I've had some mystery JS code plaguing our app's CPU performance. We're talking 40% on my 2019 MBP 16" with absolutely nothing happening on the screen.
I FOUND IT! 🎉
I won't say which OSS library it was publicly, but we're back down to 0.2 CPU baby!
😌
The open/closed React component:
A component that is based on the open/closed principle, which states that “software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification”.
Thread 👇
Horrible Experience after ordering an appliance from @Flipkart@_Kalyan_K@flipkartsupport
Order ID: OD225248070020255000
Detailed Experience in the attached image
#5: Most state is remote state. Streamline remote state via a custom "useApi" hook, react-query, or swr.
The result? WAY less code.
react-query/swr add:
✅Caching
✅Invalidates & refetches stale data
✅Dedupes requests
✅Auto retries
✅Refetch on refocus/reconnect
Problem: Fetching in useEffect means React components render, then fetch. This can lead to slow network waterfalls.
Solution: Fetch as you render. Use react-query's prefetching (prefetch in the parent) or use @remix_run which does this by default via nested routes.
#react
🧵1/8 Ever wondered why you're not able to conditionally call hooks in @reactjs?
For example, this component early returns a `null` to avoid loading data into a `useState`. It's invalid React code.
Why? How do hooks work under-the-hood?
Let's dive into React's internals.
Two years of active work and we're happy about where we got so we're releasing @getReshaped v1.0 today. Together with @hi_drozdenko we've packed all of our 10+ years of building design systems into this project and hope you all enjoy using it.
producthunt.com/posts/reshaped 👀
My biggest 5 coding mistakes as a Creative Developer during my career. A thread going through specific nitty-gritty of some code that I had implemented wrongly in some of my previous projects. 🧵
On the 28th of March, eyebrows went up across the world as HackerEarth community members opened the Practice portal and saw the design update.
Here's a thread about why we released this update and how it was done! 🧵