tldraw/apps/examples
Mitja Bezenšek e3d21e0b2b
Fix hmr. (#2303)
Fixes HMR (keyboard shortcuts should be working after making changes
after this).

Looks like the issue was that we were recreating the root using the same
element. Used a solution similar to
[this](https://stackoverflow.com/a/72139826/1810018) to prevent that
from happening.


![image](https://github.com/tldraw/tldraw/assets/2523721/f684868e-fb0b-4882-bd66-6fa4ccd33edc)

It caused other issues as well

![image](https://github.com/tldraw/tldraw/assets/2523721/ac19582e-f043-4c01-823c-cc815a808894)

### Change Type

- [x] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [ ] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Release Notes

- Fixes HMR in local dev.
2023-12-08 10:30:34 +00:00
..
e2e fix export snapshot race condition (#2280) 2023-12-04 13:52:37 +00:00
public Custom Tools DX + screenshot example (#2198) 2023-11-15 18:06:02 +00:00
src Fix hmr. (#2303) 2023-12-08 10:30:34 +00:00
.gitignore feat: add new prop to force mobile mode layout (#1734) 2023-11-11 14:11:59 +00:00
package.json fix vite HMR issue (#2279) 2023-12-01 16:48:30 +00:00
README.md transfer-out: transfer out 2023-04-25 12:01:25 +01:00
tsconfig.json Add snapshot prop, examples (#1856) 2023-09-08 14:48:55 +00:00
vite.config.ts fix vite HMR issue (#2279) 2023-12-01 16:48:30 +00:00

@tldraw/example