πŸ” About SA5's State Lib

Track, store, and apply website state for a better UX.

CONCEPT STAGE - gathering requirements and early design strategy

In many ways, this is an evolution of the SA5 Track library which already performs many of these tasks in a less structured way.

The purpose of SA5's State lib is to;

  • Maintain a current "state" representation of the website as a JS session object

  • Detect changes, like;

    • Clicking a button

    • Submitting a form

    • Visiting a specific page

  • Store that state ( in various ways, depending on the use case )

    • Retrieve that state later

  • Apply the state

    • Conditional visibility

    • Styling changes like light mode / dark mode

    • Submit the data with forms

Last updated