Hello, thank you once again for the API. Great job!
As I said on chat I am trying to use the Context API: useMagicBellContext() and MagicBellProvider to retrieve users notifications, but nothiiing is comming from rootStore
const { rootStore } = useMagicBellContext();
If I use straight the MagicBell component, I get all the notifications as expected.
The code is this:
Father component
import { MagicBellProvider } from "@magicbell/magicbell-react";
function Notifications() {
return (
<MagicBellProvider
apiKey={"df24a28e8921181f6c4220fc306ba76701592d21"}
userEmail={"josue@supportbee.com"}
>
<MyNotificationInbox />
</MagicBellProvider>
);
}
Inner component:
import { useMagicBellContext } from "@magicbell/magicbell-react";
function MyNotificationInbox() {
const { rootStore } = useMagicBellContext();
const classes = useStyles();
const notifications = rootStore.get("default");
console.log(notifications.total)
(...)
Maybe I am just messing somthing up, but I am stucked right here.
Thank you in advance.