Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-resplit v1 #19

Merged
merged 1 commit into from
Nov 18, 2023
Merged

react-resplit v1 #19

merged 1 commit into from
Nov 18, 2023

Conversation

KenanYusuf
Copy link
Owner

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.

Copy link

size-limit report 📦

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

@KenanYusuf KenanYusuf merged commit 447086b into main Nov 18, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant