toss / overlay-kit

The simplest and most intuitive way to manage overlays in React.
https://overlay-kit.slash.page
MIT License
296 stars 31 forks source link

Adding `OverlayKitProvider` missing error #76

Open helloworld-hellohyeon opened 4 months ago

helloworld-hellohyeon commented 4 months ago

Expected Behavior

If there is no OverlayKitProvider in the parent tree and overlay functions are attempted to be used in child trees, an error message should be displayed. This message should inform users that the OverlayKitProvider is missing and that overlay functions cannot be used without it.

Actual Behavior

Currently, there is no build or runtime error when OverlayKitProvider is missing.

To Resolve the Problem

Implement a runtime error to be triggered when OverlayKitProvider is not present in the parent tree. This will prevent the use of overlay-kit functions in child trees, similar to how Recoil handles such cases.

Screenshot 2024-07-29 at 11 46 51 AM