KenanYusuf / react-resplit

Resizable split pane layouts for React applications 🖖
MIT License
27 stars 5 forks source link

react-resplit v1 #19

Closed KenanYusuf closed 12 months ago

KenanYusuf commented 12 months ago

The first iteration of this library was a hook-based API, with the idea that it would allow implementors more freedom to control the markup output by react-resplit. There were some challenges with this approach, given that the methods to register the container, panes and splitters all came from the core useResplit hook, which meant that it was harder to control the mounting and unmounting of the individual elements.

This PR, and version v1.0.0 of react-resplit, replaces the hook-based API with a compound component API. Each of the resplit elements e.g. Root, Pane and Splitter, extend div elements at the moment, but in a future iteration an asChild prop, based on the Radix UI composition technique, may be introduced to provide more flexibility there.

github-actions[bot] commented 12 months ago

size-limit report 📦

Path Size
dist/resplit.es.js 2.93 KB (+6.34% 🔺)