import { useState } from 'react'; import './styles.css'; import './App.css'; import SingleHorizontal from './SingleHorizontal'; import SingleVertical from './SingleVertical'; import HorizontalSplit from './HorizontalSplit'; import VerticalSplit from './VerticalSplit'; import NestedSplit from './NestedSplit'; import StyledGutter from './StyledGutter'; import MinSize from './MinSize'; import InitialSizes from './InitialSizes'; import ScrollableChildren from './ScrollableChildren'; import OnDidResizeSplit from './OnDidResize'; import DynamicParentSize from './DynamicParentSize'; import DynamicChildren from './DynamicChildren'; enum Page { SingleHorizontal, SingleVertical, Horizontal, Vertical, Nested, StyledGutter, MinSize, InitialSizes, ScrollableChildren, OnDidResize, DynamicParent, DynamicChildren, } function App() { const [page, setPage] = useState(Page.SingleHorizontal); return (
Just make sure the parent element ('.splits' in App.css) has set max-height/max-width in px
Parent's initial width is 0% and will be set to 100% in 5s. Splitter will correctly re-render. Works also with the height.
Additional child nodes will be inserted after 5s.