Derive State from a Jotai Atom in React

InstructorDaishi Kato

Share this video with your friends

Send Tweet

Derived atoms can be created from other atoms. To do so, you pass a read function as the first argument which is traditionally called get. this will allow you to retrieve any other atom and transform the data received.

The derived atom can be used just like a normal atom but this way lets you easily separate logic outside of a component.