diff --git a/bun.lockb b/bun.lockb index 2463912..b25292f 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index f1de5e7..8dc917e 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,10 @@ "pretty": "bunx prettier --write 'src/**/*.(ts|tsx)'", "upgrade:deps": "bunx ncu -u && bun install" }, + "peerDependencies": { + "react": "18.x", + "react-dom": "18.x" + }, "devDependencies": { "@types/react": "18.2.7", "@types/react-dom": "18.2.4", @@ -20,13 +24,15 @@ "@typescript-eslint/eslint-plugin": "5.59.7", "@typescript-eslint/parser": "5.59.7", "barrels": "^1.6.6", - "bun-types": "0.6.3", + "bun-types": "0.6.4", "eslint": "8.41.0", "eslint-config-prettier": "8.8.0", "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-react": "^7.32.2", "npm-check-updates": "^16.10.12", "prettier": "^2.8.8", + "react": "^18.2.0", + "react-dom": "^18.2.0", "typescript": "beta" }, "files": [ diff --git a/src/FPContext.tsx b/src/FPContext.tsx index aa16d1b..ea4319c 100644 --- a/src/FPContext.tsx +++ b/src/FPContext.tsx @@ -1,12 +1,12 @@ -import { createContext, type RefObject } from "react"; +import { createContext } from "react"; import { FPItemRef } from "."; const observeFn = (el) => el; export const FPContext = createContext({ getIndex: (el: any) => 0 as number, - ReactFPRef: null as RefObject, - slides: [] as RefObject[], + ReactFPRef: null as FPItemRef, + slides: [] as FPItemRef[], subscribe: observeFn, unsubscribe: observeFn, });