daily-co / daily-react

React hooks and components to get started with Daily
https://docs.daily.co/reference/daily-react
BSD 2-Clause "Simplified" License
53 stars 16 forks source link

Allow nested RecoilRoot structure #4

Closed zukilover closed 1 year ago

zukilover commented 1 year ago

Feature request

Using daily-react inside an application that uses Recoil will lose its ability to access its state values of the nearest ancestor RecoilRoot.

Why you need this

We have application set up with Recoil as its dependency. Since daily-react uses Recoil internally, it is nearly impossible share states between nested RecoilRoot.

Alternatives you've considered

We have tried moving DailyProvider further up in the application structure. We don't think this approach is scalable, since daily-react Recoil does not accept any properties for its internal RecoilRoot implementation.

Regaddi commented 1 year ago

Hey @zukilover,

thank you for opening this issue and providing a PR along with it! I'll take a look at #5 and keep you posted about updates.

Best, Christian

Regaddi commented 1 year ago

A fix for this issue landed on main (cd732e9) and will be available with the next release. Closing this issue as fixed ✅