Effect CommunityEC
Effect Communityβ€’2mo agoβ€’
2 replies
lewk

TypeScript Issue with Atom Types in React Native App Using pnpm

πŸ‘‹ been enjoying working with effect + atom-react on a RN app, im using pnpm and running into this classic TS issue with Atom on the frontend

wondering if this is by design, or perhaps the lib could re-export some of these types to avoid this issue, FWIW, my i believe my type error is related to Atom.Family type

I do have some hacky fixes that work , such as importing the Atom type in the module where the error occurs - which allows TS to see the type

such as :
import { type Atom as _Atom, useAtom } from "@effect-atom/atom-react";

thanks for the consideration!
image.png
Was this page helpful?