When I run my project using “npm run dev” and “dotnet watch run” the templates load fine and the new navigation items work fine on localhost:5001.
However, if I run “npm start” and “dotnet watch run” and then open localhost:3000, I get the following error with regard to navigation:
TypeError: undefined is not an object (evaluating ‘state.nav.results’)
This error stems from line 46 in the react-spa template of App.tsx, which is:
I think this is because state.nav is coming from the ServiceStack client library, and maybe the baseUrl needs updated (so in other words, while my react app is running on port 3000, it can retrieve the nav items on port 5001, which currently isn’t happening). I prefer running on port 3000 since the create-react-app has a nice error overlay and hot reloading is faster.
The directions in the readme say it’s okay to run on port 3000, but with the new nav features, is there a way to work around this so I can load my nav items from port 5001 or for the nav items to show somehow?
Also, is there an example on how to customize the nav bar items? I was trying to find this in various source codes you have, but was unable to. Thank you for your help,