State injector component
import React, {FC, ReactNode} from 'react'import {Provider} from 'react-redux'import {State} from '@rambler-tech/react-toolkit/client'import {Store} from './store'export interface MyLayoutProps { store: Store children: ReactNode}export const MyLayout: FC<MyLayoutProps> = ({store, children}) => { return ( <> <Provider store={store}>{children}</Provider> <State name="INITIAL_STATE" state={store.getState()} /> </> )} Copy
import React, {FC, ReactNode} from 'react'import {Provider} from 'react-redux'import {State} from '@rambler-tech/react-toolkit/client'import {Store} from './store'export interface MyLayoutProps { store: Store children: ReactNode}export const MyLayout: FC<MyLayoutProps> = ({store, children}) => { return ( <> <Provider store={store}>{children}</Provider> <State name="INITIAL_STATE" state={store.getState()} /> </> )}
Optional
Generated using TypeDoc
State injector component