import React from "react" ; import { RouterProvider } from "./context/RouterContext" ; const routerEnhancer = BaseComponent => { return props => { return ( < RouterProvider > < BaseComponent { ... props } / > < /RouterProvider>); } ; } ; export default routerEnhancer ;