Don’t.
Not necessary in 99.9999999999999% of cases and would just duplicate most functionality.
And no, your app is not that 0.000000000001%
And no, your app is not that 0.000000000001%
Wouldn't you want client side statefulness if you have an app like an online spreadsheet (google sheets, microsoft excel) that could occasionally lose connection but you still want users to be able to continue working on their document?
Complex client side state or collaborative features might use something like https://github.com/slab/delta-elixir or https://www.inkandswitch.com/local-first/ which is where I'd want JS.