Skip to content

Commit

Permalink
useSnapshot from valtio/react
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi committed Mar 23, 2024
1 parent 1335183 commit fa0f3aa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/01_typescript/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @jsxImportSource valtio-signal */

import { proxy } from 'valtio/vanilla';
import { useSnapshot } from 'valtio';
import { useSnapshot } from 'valtio/react';
import { $ } from 'valtio-signal';

const state = proxy({ count: 0, text: 'hello' });
Expand Down
2 changes: 1 addition & 1 deletion examples/02_props/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @jsxImportSource valtio-signal */

import { proxy } from 'valtio/vanilla';
import { useSnapshot } from 'valtio';
import { useSnapshot } from 'valtio/react';
import { $ } from 'valtio-signal';

const state = proxy({ count: 0 });
Expand Down
2 changes: 1 addition & 1 deletion examples/03_async/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { Suspense } from 'react';
import { proxy } from 'valtio/vanilla';
import { useSnapshot } from 'valtio';
import { useSnapshot } from 'valtio/react';
import { $ } from 'valtio-signal';

const fetchUser = async (id: number) => {
Expand Down
2 changes: 1 addition & 1 deletion examples/04_todos/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import { memo } from 'react';
import type { FormEvent } from 'react';
import { proxy } from 'valtio/vanilla';
import { useSnapshot } from 'valtio/react';
import { derive } from 'derive-valtio';
import { useSnapshot } from 'valtio';
import { $ } from 'valtio-signal';

const createRandomColor = () => `hsl(${Math.random() * 360}deg,100%,50%)`;
Expand Down

0 comments on commit fa0f3aa

Please sign in to comment.