From fc86c2a4bdb41725f145169967889b43d3ac3cd7 Mon Sep 17 00:00:00 2001 From: Juho Teperi Date: Fri, 1 Dec 2023 16:10:33 +0200 Subject: [PATCH] Docs --- doc/ReactRefresh.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/ReactRefresh.md diff --git a/doc/ReactRefresh.md b/doc/ReactRefresh.md new file mode 100644 index 00000000..a4206c09 --- /dev/null +++ b/doc/ReactRefresh.md @@ -0,0 +1,8 @@ +# React Refresh + +- `reagent.dev` ns must be required before anything that loads `react-dom` +- Don't call `r.dom/render` after reload (e.g. shadow-cljs hook) +- Call `reagent.dev/refresh!` instead +- Only components defined using `r/defc` will refresh +- Reagent doesn't try to create Hook signatures for components, + so hook state is reset for updated components.