From 80a15313dcb97505041362dece73f6ae39b87ff0 Mon Sep 17 00:00:00 2001 From: Gil Nimer Date: Sun, 20 Aug 2023 14:35:34 +0300 Subject: [PATCH] Add `children: ReactNode` prop to the `StateInspectorProps` type As noted in the issue below, currently inserting React Nodes as a children prop into the StateInspector component will result with a TypeError. https://github.com/troch/reinspect/issues/83 This is an issue for React >18 only, as noted in the stackoverflow below, the React.FC type does not include the children: ReactNode anymore. https://stackoverflow.com/questions/71788254/react-18-typescript-children-fc/71800185#71800185 --- src/StateInspector.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/StateInspector.tsx b/src/StateInspector.tsx index d37cb69..7e89b95 100644 --- a/src/StateInspector.tsx +++ b/src/StateInspector.tsx @@ -11,6 +11,7 @@ declare global { interface StateInspectorProps { name?: string initialState?: any + children?: React.ReactNode } interface StoreReducerAction {