diff --git a/README.md b/README.md index ea32bfd..9441d49 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ A super lightweight modern alternative to [`react-slot-fill`](https://github.com - [x] Render content of sub-component in multiple places - [x] Speedy - `Fill` and `Slot` communicate directly with each other - [x] Tested with [`testing-library`](https://testing-library.com) -- [x] Uses [`nanoevents`](https://github.com/ai/nanoevents) under hood -- [x] Only 414 B (including deps) +- [x] Zero dependencies +- [x] Only ~400 B ## 📦 Install diff --git a/package-lock.json b/package-lock.json index e1d5de5..125a0dd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7367,11 +7367,6 @@ "dev": true, "optional": true }, - "nanoevents": { - "version": "5.1.10", - "resolved": "https://registry.npmjs.org/nanoevents/-/nanoevents-5.1.10.tgz", - "integrity": "sha512-QOE78g63vQ7V1JzhOLP8UNlaLOF/llDtfUhCj9GlbhQQc0YdPi5GNJKZdeWE0fvDtGF39un6uSf7RObeBm0eAg==" - }, "nanoid": { "version": "3.1.18", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.18.tgz", diff --git a/package.json b/package.json index 34e18af..111147c 100644 --- a/package.json +++ b/package.json @@ -40,9 +40,7 @@ "jest": { "preset": "ts-jest" }, - "dependencies": { - "nanoevents": "^5.1.10" - }, + "dependencies": {}, "peerDependencies": { "react": "^16.0.0 || ^17.0.0" }, diff --git a/src/index.test.tsx b/src/index.test.tsx index 221cf37..7e8f917 100644 --- a/src/index.test.tsx +++ b/src/index.test.tsx @@ -8,22 +8,27 @@ import { Fill, Slot, SlotsProvider } from '.' let isServer = false jest.mock('./is-server', () => () => isServer) +const SLOT_NAMES = { + FIRST: 'first-slot', + NESTED: Symbol('nested-slot'), +} as const + const Parent = ({ children }: { children: React.ReactNode }) => (