DEV Community

Cover image for This Week In React #131: useReducer, Controlled Inputs, Async React, DevTools, React-Query, Storybook, Remix, RN , Expo...
Sebastien Lorber
Sebastien Lorber

Posted on • Originally published at thisweekinreact.com

 

This Week In React #131: useReducer, Controlled Inputs, Async React, DevTools, React-Query, Storybook, Remix, RN , Expo...

Hi everyone!

We're gradually coming out of the holiday season. There are quite a few blog posts; but no major announcements apart from React-Native 0.71.

I'm back from a ski vacation and back on the weekly newsletter schedule. I didn't follow everything but I think the Twitter drama of the week was about Tailwind? πŸ˜…

Only 2 days left to take the State of React-Native survey πŸ™

For creative web devs interested in React-Three-Fiber, subscribe to the Web Game Dev newsletter: you will find more info than here.


πŸ’‘ Subscribe to the official newsletter to receive an email every week!

banner


πŸ’Έ Sponsor

React Bricks is a CMS with visual editing based on React components

React Bricks is a CMS with visual editing based on React components

It's flexible for Developers: create your own design system using React components, add Visual editing in your JSX and add sidebar controls to edit props like the background color. Choose Next.js, Gatsby or Remix and any CSS framework you like!

It's easy for Content editors who can directly edit in a visual way without breaking the design system: much easier than editing abstract entities using gray fields, as in a headless CMS. And you save time, as Content editors are autonomous!

It's enterprise-ready with Collaboration, Time-machine, Single Sign-on, GDPR-compliant datacenters, Global CDN for optimized images, E-commerce integration, Scheduled publishing and more.

Get started here: ReactBricks.com


βš›οΈ React

useReducer

A Cure for useState Hell

Proposes to replace several useState with a useReducer with a single action. He explains the advantages, like the possibility to make sure the state is consistent, or to migrate later to a reducer with several actions. An interesting pattern to know. My opinion: it is quite possible to get similar benefits by using a single useState with a single object and a custom hook. useState or useReducer should be an implementation detail.


useReducer

Type-safe React Query

With TypeScript, you'd rather not fool yourself. Can we trust our backend to return the right payload. Dominik suggests combining React-Query with Zod. With inference, it is no longer necessary to force a type with as or generics. We can use tRPC or Zodios in a fullstack environment when the backend and frontend are in the same monorepo.



πŸ’Έ Sponsor

Developer Nation Survey - Do you want to make an impact on the developer ecosystem?

Do you want to make an impact on the developer ecosystem?

Based on the latest State of the Developer Nation report, React is by far the most popular client-side library as it is used by 58% of web developers who use client-side web frameworks. What are your thoughts?

Take part in the most complete survey Developer Nation has ever created, shape the key trends among developers for 2023 and win amazing prizes! 🎁

Upon completion you will get free access to our Virtual Goody Bag. Don't forget to sign up to enter the weekly draws. Among the 250 prizes you can find a ThinkPad L15 Gen 3, an Intel NUC 10 Performance Mini PC, IoT kits, an iPad Air, gift cards, Udemy courses, tech accessories, and many more.

Start here!


πŸ“± React-Native

useReducer

React Native 0.71: TypeScript by Default, Flexbox Gap, and more...

A big release with among other things:

  • TypeScript by default
  • Flex gap support in pixels (percentage support is coming later)
  • New web-inspired props (accessibility, style, events) that should simplify cross-platform dev.
  • Improved DX: click-to-inspect DevTools, new Hermes version, new architecture...
  • Android Prebuilts on Maven Central: Android build time reduced by 94%, and various other impacts. Note: it could be possible to greatly improve iOS build times as well.

expo-m1

Various new articles on the Expo blog:



πŸ§‘β€πŸ’» Jobs

πŸ§‘β€πŸ’Ό TLDR - Senior Software Engineer (Remote, $120k-200k)

The TLDR newsletter is hiring its first engineer to help build out the hiring platform along with other internal projects. Looking for someone with experience shipping side projects or on small teams, with experience in Next.js and Postgres/Supabase.

πŸ§‘β€πŸ’Ό Product Engineer at Causal, Remote/London/NY, $150-250k

Causal is a Series A Startup (backed by Coatue/Accel) building an all-in-one tool for working with numbers and visualizing data. We're looking for strong React engineers who can solve difficult UX/performance challenges.

πŸ§‘β€πŸ’Ό Callstack - Senior React Native Developer - Fully Remote, PLN 21-32k net on B2B, monthly

Do you want to work on the world's most used apps? Would you like to co-create the React Native technology? Join the Callstack team of React & React Native leaders. Check our website for more details. We are looking forward to seeing your application - show us what you've got!

πŸ§‘β€πŸ’Ό G2i - 100% Remote React Native Jobs

We have several roles open for developers focused on React Native! Pay is ~160k plus 10% bonus. You must have production experience with RN and be based in the US. DM @gabe_g2i to learn more and don't forget to mention This Week in React.

πŸ’‘ How to publish an offer?


πŸ”€ Other


🀭 Fun

alt

Top comments (0)

Visualizing Promises and Async/Await 🀯

async await

Learn the ins and outs of Promises and Async/Await!