From f2638ba66c3a09c421921d0ba48c7010e70b7b75 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Wed, 4 Jan 2023 21:45:57 -0500 Subject: [PATCH] Create four-parrots-poke.md --- .changeset/four-parrots-poke.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .changeset/four-parrots-poke.md diff --git a/.changeset/four-parrots-poke.md b/.changeset/four-parrots-poke.md new file mode 100644 index 00000000..d2fb0f8d --- /dev/null +++ b/.changeset/four-parrots-poke.md @@ -0,0 +1,8 @@ +--- +'react-json-tree': major +--- + +Remove UNSAFE method from react-json-tree +- Replace `shouldExpandNode` with `shouldExpandNodeInitially`. This function is now only called when a node in the tree is first rendered, when before it would update the expanded state of the node if the results of calling `shouldExpandNode` changed between renders. There is no way to replicate the old behavior exactly, but the new behavior is the intended behavior for the use cases within Redux DevTools. Please open an issue if you need a way to programatically control the expanded state of nodes. +- Bump the minimum React version from `16.3.0` to `16.8.0` so that `react-json-tree` can use hooks. +- Tightened TypeScript prop types to use `unknown` instead of `any` where possible.