Create button to change views in an online SP list

I have an online list of modern sharepoint with 2 views.
Is it possible to create 2 buttons to change the view "on the fly"?
json or via ClientSideExtension.ListViewCommandSet.CommandBar or is there another way. I know that I can create links but that would reload the page and be slow.

Thank you
Dead in