Copy
View this email in your browser
TWiW|22.3.20 #107

This week we take a look at React Suspense, simplifying your unit tests by avoiding nesting, a year of React Hooks and more!

 

Enjoy 🎉

Persisting React state in localStorage
JavaScript

Persisting React state in localStorage

By Josh W Comeau
Josh W Comeau shares how to use the useStickyState React Hook to simply persist your apps state in LocalStorage.
React Suspense in practice
JavaScript

React Suspense in practice

By Adam Rackis
This post is about understanding how Suspense works, what it does, and seeing how it can integrate into a real web app. Adam Rackis looks at how to integrate routing and data loading with Suspense in React.
Avoid nesting when you’re testing
Testing

Avoid nesting when you’re testing

By Kent C. Dodds
Kent C. Dodds discusses how using hooks like beforeEach as a mechanism for code reuse leads to unmaintainable tests and how to avoid it.
React Hooks - 1 year later
Podcast

React Hooks - 1 year later

By Syntax
In this episode of Syntax, Scott and Wes talk about React Hooks, one year later - what's changed, how to use them, and more!
@JoshWComeau
Tweet

@JoshWComeau

7:35 PM · Mar 12, 2020
PSA: If you want to crop an image, you don’t have to do that thing where you make it a background image anymore! Instead, you can use a real image and `object-fit`.
This way, users can still right-click to save the image, plus you can add an alt tag for screen readers!

Copyright © 2020 This Week in Web, All rights reserved.


Want to change how you receive these emails?
You can update your preferences or unsubscribe from this list.

Email Marketing Powered by Mailchimp