DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for Reactathon - React in the Park May 2022
Alan Richardson for AG Grid

Posted on • Originally published at blog.ag-grid.com on

Reactathon - React in the Park May 2022

Reactathon - React in the Park May 2022

React in the Park took place in San Francisco, on 2 - 5 May 2022.

AG Grid sponsored the live stream for the conference.

All three days were streamed live on YouTube and are available to watch on the Real World React Channel.

Talks are being edited out and released to the channel as separate videos.

The talks that stood out for me are listed below. Because I'm a fan of State Machines, the two talks about Xstate were top of my list.

David Khourshid presented an interesting talk about useEffect called "Goodbye, useEffect" and:

  • how it should not be used as a lifecycle hook to load data into the component
  • how it should not be used to set state as a side-effect
  • how it should ideally be used with a dependency array

He also describes the React 18 Strict Mode change where useEffect is called twice to trigger an effect, cleanup and effect again. This is to help trigger developers to move side-effect code out of the rendering logic and into event handlers.

His recommendation is to treat useEffect as a synchronisation mechanism and use in conjunction with state machines where effects happen during a state transition.

David has a tool called stately.ai which helps build Xstate state machines. This can be used with useSyncExternalStore to synchronise with external data sources.

Another option that the React community seems to be suggesting as an alternative to fetching in a useEffect is to use something like the useQuery hook from React Query or Suspense. React Query also supports suspense.

Shruti Kapoor provided a presentation that summarised the changes made in React 18, spending time on Batching, concurrent rendering, and transitions. Shruti also described an update strategy to start taking advantage of concurrent rendering.

Erik Rasmussen provided another state machine based talk ("State Machines on the Edge"), this time for handling backend logic. In the talk Erik creates a state machine visually using Stately.ai and Xstate. This process demonstrates the simulation functionality available for Xstate state machines and the sync to code functionality.

Many of the other talks were interesting in terms of providing overview of the state of the industry and general approaches so it's worth watching the live streams and skipping through to see which talks resonate quickly with you.

We would have loved to have been in attendance at the conference but having the livestream recordings available is incredibly useful. You can watch the live stream recordings from the links below:

Top comments (0)

🌚 Life is too short to browse without dark mode