Commit graph

4 commits

Author SHA1 Message Date
Miguel Serrano
ef0e475b04 Migrate usePersistedState hook to Typescript (#7739)
* Migrate `usePersistedState` hook to Typescript

* Use React types for setter functions

Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
GitOrigin-RevId: e9ddf6e2ab45e0b0739c850a89ec7be0f14a7506
2022-04-27 08:04:03 +00:00
Alf Eaton
e76b7696da Add listen parameter to usePersistedState hook (#5134)
GitOrigin-RevId: d40f942164403a31ffbb10336227eef59a57febf
2021-09-30 08:04:25 +00:00
Alf Eaton
388d9c0f1e Add to globals from jsdom for frontend unit tests (#5283)
* Add to globals from JSDOM for frontend unit tests
* Fix tests

GitOrigin-RevId: 3a73477d9e4c3316ab2c9510ce3360740c3feb53
2021-09-30 08:04:19 +00:00
Alf Eaton
233ceb5356 Allow function as value for usePersistedState hook (#5131)
* Allow function value in usePersistedState
* Add tests for usePersistedState
* Use nullish coalescing to avoid calling getItem twice

GitOrigin-RevId: e0351addea904aefb7a402bff32689792b49fbbb
2021-09-24 08:04:21 +00:00