Sidebar active links live view

Hi im trying ti use phoenix,
And i have a sidebar component and i wanted to set the active link, but doing so with live view to prevent the full page reload, kind of like turbolinks.

Thanks for the help

Yes you can do that.

It’s even easy…

But are your current sidebar already in a LiveView project? (I mean when you say it’s a component, you mean it’s a LiveComponent?)

Or do you refer to it as a JS component in a front end project?

I’m asking just to understand a bit more your need…

My current project I was not doing it. I was just using the full page reload and not showing the active. Now im working on version 2 of the project and wanted to do a full blown LiveView and was wondering if I could just change the way i was doing it.

Look how does it.

1 Like