79229887

Date: 2024-11-27 10:41:53
Score: 3.5
Natty:
Report link

Instead of localstorage, you can store current page in URL query params, which is common and best practice to handle those kind of caching. Base on URL query params, you can easily retreive values like currentHeadingId or currentSubHeadingId. https://v5.reactrouter.com/web/example/query-parameters

How to get parameter value from query string?

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: zimnykisiel