Skip to content

Commit

Permalink
feat: react17 support
Browse files Browse the repository at this point in the history
  • Loading branch information
fkhadra committed Dec 18, 2024
1 parent 06886b4 commit 52184c6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"build": "tsup && cp src/style.css dist/ReactToastify.css"
},
"peerDependencies": {
"react": "^18 || ^19",
"react-dom": "^18 || ^19"
"react": "^17 || ^18 || ^19",
"react-dom": "^17 || ^18 || ^19"
},
"prettier": {
"printWidth": 120,
Expand Down Expand Up @@ -70,7 +70,8 @@
"vite-plugin-istanbul": "^6.0.2"
},
"dependencies": {
"clsx": "^2.1.1"
"clsx": "^2.1.1",
"use-sync-external-store": "^1.4.0"
},
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
12 changes: 12 additions & 0 deletions pnpm-lock.yaml

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

3 changes: 2 additions & 1 deletion src/hooks/useToastContainer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useRef, useSyncExternalStore } from 'react';
import { useRef } from 'react';
import { useSyncExternalStore } from 'use-sync-external-store/shim';
import { isToastActive, registerContainer } from '../core/store';
import { Toast, ToastContainerProps, ToastPosition } from '../types';

Expand Down

0 comments on commit 52184c6

Please sign in to comment.