useGate
useGate(GateComponent, props)
Function for passing data to Gate
Arguments
GateComponent
(Gate)props
(Props)
Returns
(void
)
Example
import {createGate, useGate} from 'effector-solid'
import {Route, Routes} from 'solid-app-router'
const Page = createGate('page')
Page.state.watch(({match}) => {
console.log(match)
})
const Home = props => {
useGate(Page, props)
return <section>Home</section>
}
const App = () => (
<Routes>
<Route element={<Home />} />
</Routes>
)