Quick question about URL Parameter vs Custom States

Hey guys, I’ve been looking around but I can’t find an answer for my question. I’m building an on-page application and just started to understand and implement URL Parameters. But I’m getting a little bit unsure when it comes to hidable and other action for page/group layout.

So my question / statement; which I would like to see challenged for “best practis”

  1. When I want to be able to send a link that leads to an element and populate it with data
  • Use URL Parameter
  1. When it’s a “cosmetic”, hide / show action
  • Use customState
  1. When it’s a preset user preference I save it in the database
  • “On page load” set state from user preferences

Here i have gone all in on the URL, but cant shake that a combo would be better?
Any good tip on cookies and best pracis of them?

Appreciate all input here :slight_smile: Thanks!

Yes you are correct in all 3 cases and my single page app uses Parameters and custom states as you have described.

1 Like