tiptap/demos
Nick Perez 6a0f4f30f8
fix(react): attempt to cleanup editor instances, on creation #5492 (#5496)
The core of the change ended up being quite simple, because we can create the editor within the first render, we need to already schedule it's destruction.
Scheduling a destruction, ensures that an instance that was created in that first render pass can be cleaned up.
Waiting one more tick than before ensures that we don't accidentally destroy an editor instance that could actually be valid in the next render pass.

In StrictMode, there will be two editor instances created, the first will be created & quickly destroyed in 2 ticks.
In Normal React, there will only ever be 1 instance created and destroyed only on unmount.
2024-08-15 08:55:42 +02:00
..
preview fix: fix shiki setup (#5347) 2024-07-15 14:05:47 +02:00
public add basic vite setup 2021-08-25 11:52:20 +02:00
setup Merge branch 'main' into develop 2024-08-06 16:37:34 +02:00
src fix(react): attempt to cleanup editor instances, on creation #5492 (#5496) 2024-08-15 08:55:42 +02:00
CHANGELOG.md chore(release): publish version v2.5.9 (#5451) 2024-08-06 17:03:26 +02:00
includeDependencies.txt docs: fix demos resolution of y-prosemirror 2024-08-12 13:50:19 +02:00
index.html redirect demos 2021-08-26 10:06:14 +02:00
package.json chore: dedupe esbuild 2024-08-12 14:13:46 +02:00
postcss.config.cjs chore: update package versions for prosemirror 2024-06-28 08:17:13 +02:00
tailwind.config.js bump tailwind; add tailwind to demos 2023-05-08 11:37:20 +02:00
tsconfig.base.json check ts correctly on demo build 2021-09-17 23:44:01 +02:00
tsconfig.react.json check ts correctly on demo build 2021-09-17 23:44:01 +02:00
tsconfig.vue-2.json check ts correctly on demo build 2021-09-17 23:44:01 +02:00
tsconfig.vue-3.json check ts correctly on demo build 2021-09-17 23:44:01 +02:00
vite.config.ts chore: resolve to root dir 2024-08-12 14:23:11 +02:00