You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am struggling with really strange error and I did not find the solution for last 2 hours so I decided to ask for help.
I have setup of React, Redux, Webpack, React Hot Loader, all with TypeScript.
I have used a boilerplate, but after I ran into this issue I changed webpack config to reflect example from RHL repo.
It is compiling properly but I cannot get protected route working because if user is authenticated, so it is supposed to render provided component, it is throwing error from the title of this question.
I can pass anything to the protected route and it will always throw:
(AppContainer)RangeError: Maximum call stack size exceeded
This is the call stack:
react-hot-loader.development.js?2cd8:2202 Uncaught RangeError: Maximum call stack size exceeded
at renderReconciler (react-hot-loader.development.js?2cd8:2202)
at Object.asyncReconciledRender [as componentWillRender] (react-hot-loader.development.js?2cd8:2220)
at Component.hotComponentRender (react-hot-loader.development.js?2cd8:718)
at Component.proxiedRender (react-hot-loader.development.js?2cd8:750)
at Component.hotComponentRender (react-hot-loader.development.js?2cd8:730)
at Component.proxiedRender (react-hot-loader.development.js?2cd8:750)
at Component.hotComponentRender (react-hot-loader.development.js?2cd8:730)
at Component.proxiedRender (react-hot-loader.development.js?2cd8:750)
at Component.hotComponentRender (react-hot-loader.development.js?2cd8:730)
at Component.proxiedRender (react-hot-loader.development.js?2cd8:750)
I have really no idea what is going on.
I have tried to change the config:
setConfig({logLevel: 'debug',ignoreSFC: true,// the same errorpureRender: true// change error to instance.render is not a function});
but it does not help.
I will really appreciate any help.
The text was updated successfully, but these errors were encountered:
<ProtectedRoutepath="/dashboard"component={()=><div>Test</div>}/>// should beconstComponent=()=><div>Test</div>;<ProtectedRoutepath="/dashboard"component={Component}/>
Right now you are creating a new component every render. Dont do it.
I am struggling with really strange error and I did not find the solution for last 2 hours so I decided to ask for help.
I have setup of React, Redux, Webpack, React Hot Loader, all with TypeScript.
I have used a boilerplate, but after I ran into this issue I changed webpack config to reflect example from RHL repo.
It is compiling properly but I cannot get protected route working because if user is authenticated, so it is supposed to render provided component, it is throwing error from the title of this question.
This is my ProtectedRoute component:
Simple like that.
I am trying to just use:
isAuthenticated is a crazy simple function so far:
I can pass anything to the protected route and it will always throw:
This is the call stack:
I have really no idea what is going on.
I have tried to change the config:
but it does not help.
I will really appreciate any help.
The text was updated successfully, but these errors were encountered: