-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
The current hook API returns a ref that the consumer must attach to the element. If the consumer also has their own ref, they need to merge the refs manually, which can be unwieldy.
Describe the solution you'd like
An alternative approach is to require that the consumer create their own ref and pass it into the hook.
// defaults
const ref = useRef();
const [isMounted, show, hide] = useShowtime(ref);
// with settings
const ref = useRef();
const [isMounted, show, hide] = useShowtime(ref, "rise");
See https://twitter.com/buildsghost/status/1338951882052567041 for some discussion.
Additional context
Unclear if we should do this. We need to evaluate pros and cons.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request