When should I use the route component and when the browser component?

I’ve searched everywhere but I can’t understand why should I use route and how routing works.
I’m using the browser go to but why shouldn’t I just use route to go to another page?

I’m trying to build an SPA with node.

TNX :slight_smile:

Hi.
I looks like you haven’t searched enough. These things are well documented from what I remember.

To answer your question: route & browser component are completely different.
Route component is NOT used in NodeJS SPA, as explained in docs.

So, you will always have to use either Anchor tag with internal enabled or a button with click dynamic event set to browser.goto with internal enabled to route to other pages in NodeJS SPA.
Again, mentioned in docs I think.

You can also use click event on anchor tag, but I recommend to avoid it.

1 Like

Thanks, that’s a great and clear answer.
I did search in the docs and the forum and I’ve read many SPA guides but I couldn’t find it there.

By “Anchor tag” you mean Anchor Button?

Yes.
Never noticed its called Anchor Button in Wappler. :sweat_smile:

This is the doc we refer for NodeJS SPA: Building SPA pages with NodeJS