import React , { useMemo } from "react" ; import { useRouterContext } from "../react-bind" ; export const ResponseCode = ( { status , children , } ) => { const router = useRouterContext ( ) ; useMemo ( ( ) => { router . statusCode = status ; } , [ ] ) ; return < > { children } < />; } ;