Type Error (React 18.2.0)
See original GitHub issueHi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch react-split-pane@0.1.92 for the project I’m working on.
I got the following error:
Type error: Type '{ children: Element[]; split: "vertical"; minSize: number; defaultSize: number; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<SplitPane> & Pick<Readonly<SplitPaneProps>, never> & InexactPartial<...> & InexactPartial<...>'.
Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<SplitPane> & Pick<Readonly<SplitPaneProps>, never> & InexactPartial<...> & InexactPartial<...>'.
7 | const Home: NextPage = () => {
8 | return (
> 9 | <SplitPane split='vertical' minSize={50} defaultSize={100}>
| ^
10 | <div />
11 | <div />
12 | </SplitPane>
Here is the diff that solved my problem:
diff --git a/node_modules/react-split-pane/index.d.ts b/node_modules/react-split-pane/index.d.ts
index d116f54..3c7eb24 100644
--- a/node_modules/react-split-pane/index.d.ts
+++ b/node_modules/react-split-pane/index.d.ts
@@ -5,6 +5,7 @@ export type Size = string | number;
export type Split = 'vertical' | 'horizontal';
export type SplitPaneProps = {
+ children: React.ReactNode[],
allowResize?: boolean;
className?: string;
primary?: 'first' | 'second';
This issue body was partially generated by patch-package.
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
Error: Next.js requires React 18.2.0 to be installed. #41855
I have React 18.2.0 installed, but I get an error Next.js requires React 18.2.0 to be installed. during build firebase.
Read more >React 18 + CSSTransition makes error : TypeError: Cannot ...
I found solution here, i changed my routing as in example http://reactcommunity.org/react-transition-group/with-react-router.
Read more >@types/react - npm
Start using @types/react in your project by running `npm i @types/react`. There are 13578 other projects in the npm registry using @types/react.
Read more >Upgrading to React 18 with TypeScript - LogRocket Blog
The upgrade of the React type definitions to support React 18 involved some significant breaking changes that developers should know about.
Read more >Module not found: Can't resolve 'react/jsx-runtime' | bobbyhadz
To solve the error "Module not found: Error: Can't resolve 'react/jsx-runtime'", make sure to update the react package by opening your terminal in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Actually - I just found a new split panel package that works nicely with React 18
It’s also being actively maintained by the look of it:
https://github.com/johnwalley/allotment
@lewismazzei thanks for walking through that, much appreciated. Cheers