import { UseFormEditorReducerStateType } from "../../../../types" ; export function init ( props ) { return { ... props } ; } export function formEditorReducer ( state , action ) { const next = { ... state } ; switch ( action . type ) { case "data" : { next . data = action . data ; break ; } } return next ; }