or subscribe with
Join 6,200+ readers for one email each week.
Digests » 310
Let’s walk through the steps you can take to set up a development environment that enables you to develop a component library. In this blog, you will also learn how to have a built npm package ready to distribute to other developers at your company. Check it out!
this week's favorite
The React library is pretty straightforward and is relatively easy to get into, especially with the wide variety of materials that exist to help you learn it. But every tool has its share of tricks or issues that these tutorials usually don’t cover. You get to learn them when someone reviews your code, or worse — when you’re facing a problem and are desperate to find a solution. Hopefully, with this article, I might reveal some of these things about React, and maybe even surprise you!
Writing proper behaviour tests in React with Enzyme and Jest is not a trivial task. I have spent three years on this topic and in this article, I will share my learnings and guidelines to how you can get more useful, reliable, and meaningful behaviour tests for your React code if you are only allowed to use Enzyme.
Somehow, using an obscure half-string-half-function syntax, the tool was able to take some arbitrary CSS and assign it to a React component, bypassing the CSS selectors we've always used.
Further testing showed that every render takes less than 1ms. startTransition and time slicing didn't even have time to kick in.