Skip to content

Commit

Permalink
Upgrade @tomic/react to be compatible with react 19
Browse files Browse the repository at this point in the history
  • Loading branch information
Polleps committed Dec 9, 2024
1 parent 41471d8 commit 3a43928
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 11 deletions.
50 changes: 44 additions & 6 deletions browser/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions browser/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,21 @@
"url": "https://github.com/atomicdata-dev/atomic-server/issues"
},
"dependencies": {
"@tomic/lib": "workspace:*"
"@tomic/lib": "workspace:*",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/react-router-dom": "^5.3.3",
"tsup": "^8.3.5",
"typescript": "^5.6.3"
},
"peerDependencies": {
"react": ">18.3.0"
"react": ">18.3.0",
"react-dom": ">18.3.0"
},
"files": [
"dist",
Expand Down
2 changes: 1 addition & 1 deletion browser/react/src/useDebounce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function useDebouncedCallback<F extends Callback>(
time: number,
deps: unknown[],
): [debouncedFunction: (...args: Parameters<F>) => void, isWaiting: boolean] {
const timeoutId = useRef<ReturnType<typeof setTimeout>>();
const timeoutId = useRef<ReturnType<typeof setTimeout>>(undefined);
const [isWaiting, setIsWaiting] = useState(false);

const memoizedFunction = useCallback(
Expand Down

0 comments on commit 3a43928

Please sign in to comment.