repeater.state.js
12 lines
| 1 | import RepeaterStateContext from '../context/repeater.state'; |
| 2 | import useRepeaterState from '../../hooks/useRepeaterState'; |
| 3 | |
| 4 | function RepeaterState( { state, children } ) { |
| 5 | const functions = useRepeaterState( state ); |
| 6 | |
| 7 | return <RepeaterStateContext.Provider value={ functions }> |
| 8 | { children } |
| 9 | </RepeaterStateContext.Provider>; |
| 10 | } |
| 11 | |
| 12 | export default RepeaterState; |