found
found copied to clipboard
router config giving error in rendering component
it giving error
Warning: Functions are not valid as a React child. This may happen if you return a Component instead of from render. Or maybe you meant to call this function rather than return it.
`export default makeRouteConfig(
<Route
history={history}
path={HOME}
Component={App}
query={AppQuery}
render={({ resolving, props }) => {
return props ? <App {...props} /> : <h1>Loading....</h1>
}}
>
<Route
history={history}
path={DASHBOARD}
getComponent={() =>
import('../components/Dashboard/Dashboard').then(
module => module.default
)
}
render={({ props, Component }) => {
if (false) {
throw new RedirectException(DEFAULT_REDIRECT_AFTER_AUTH)
} else {
return props ? (
<Component {...props} />
) : (
<h1>Loading....</h1>
)
}
}}
/>
</Route>
)"
That code looks fine to me. Where specifically is that exception coming from?