I am running the next js app in tizen emulator, but the routing of the next js is not working in tizen. What is the solution for it?

148 views Asked by At

Next js routing between the components is not working in the tizen emulator. What is the solution for it?

We are running the next build file in the tizen software but it shows only index.html file of build folder and when we give routing it does'nt work.

2

There are 2 answers

0
B 23 On

nextjs used file based router, but tizen not supported it. You can use SPA(Single Page Application) for tizen.

0
Raj Shah On

You can use your custom logic to handle all pages without routing (single-page app). You need to manage the state of the current page and let it render into the DOM. Just show and hide the pages as you need to traverse your app.

return (
    {page === HOME && (<Home />)}
    {page === SEARCH && (<Search />)}
)