Get the latest tech news

Class methods are Ruby's useEffect


Tread carefully around both escape hatches

Instead, most applications are better off relying on libraries that call useEffect under the hood to fetch data and manage server state. At Campsite, we use TanStack Query, which lets us avoid effects and helps us keep interactions feeling snappy with optimistic updates. Between guests, private projects, and public posts, Campsite gives admins and authors a variety of ways to control who can see content, and we use scopes to apply those rules consistently and performantly.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Class methods

Class methods

Photo of Ruby s useEffect

Ruby s useEffect