Can't use hook inside Higher order component
I want to use a useState hook inside my HOC, but that prevents the component from being rendered here is my component import WithAccessControl from "components/HOC/AccessControl"; function GoalPage(props: any) { return <div>Who stole my goals?</div>; } export default WithAccessControl(GoalPage); and this is my HOC which the component is passed to: import React from "react"; const… Read More Can't use hook inside Higher order component