Migrate twenty ui to jotai (#17900)
## Remove Recoil from twenty-ui Completely removes the `recoil` dependency from `twenty-ui` by converting all atoms, hooks, and providers to Jotai equivalents. ### twenty-ui - `createState` now returns a Jotai `PrimitiveAtom` instead of a Recoil atom - `iconsState`, `IconsProvider`, `useIcons` converted to Jotai (`useSetAtom`, `useAtomValue`) - `RecoilRootDecorator` now uses Jotai `Provider` (name kept for compat) - Deleted unused `invalidAvatarUrlsState` (Avatar already uses `invalidAvatarUrlsAtomV2`) - Removed `recoil` from `package.json` ### twenty-front - Created local Recoil `createState` at `@/ui/utilities/state/utils/createState` for ~112 state files still on Recoil - Updated all imports accordingly - Removed `iconsState` from Recoil snapshot preservation in `useAuth` (lives in Jotai store now)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { createState } from 'twenty-ui/utilities';
|
||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
||||
export const isActivityInCreateModeState = createState<boolean>({
|
||||
key: 'isActivityInCreateModeState',
|
||||
defaultValue: false,
|
||||
|
||||
Reference in New Issue
Block a user