How to add condition inside react routes object?

后端 未结 0 691
野的像风
野的像风 2021-01-06 03:10

I\'m trying to add condition to react routes object like this but it throws error,

const routes = (isAuthenticated) => [
  {
    path: \'app\',
    element         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题