-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Labels
Description
Having a context will be usefull when you are dealing with nested component which avoid to do props drilling to get live_view callback.
https://github.com/mrdotb/live_react/blob/main/assets/js/live_react/hooks.js#L23
import { useLiveReact } from 'live_react'
export const Component = () => {
const { pushEvent } = useLiveReact
// ...
}Then should the component be wrapped automatically or should it be the user responsibility to wrap his component with the live_react context 🤔
import { LiveReactProvider } from 'live_react'
<LiveReactProvider>
// ...
</LiveReactProvider>Reactions are currently unavailable