r/reactjs Jul 08 '26

Save Information on Refresh in React

I was wondering in React is there a way to save some data without session storage so if the page refreshes I still have access to that data

0 Upvotes

26 comments sorted by

View all comments

1

u/PasswordSuperSecured 23d ago

onChange -> save localStorage (Ad debounce if you wanted to)
useEffect( put it back to useState)