How does localStorage store method type data?

A breadcrumb navigation function that encapsulates a separate component. When you close the current tab, you need to jump to the previous path.

clipboard.png

I consider passing history when the parent invokes this component, and then I can jump through history.push () .
then I think of the problem of data persistence, so I intend to save history to localStorage ,
but because JSON.stringify (function.) will put the method body Filter:
ECMASCript officials have also specially emphasized this point:

It does not attempt to impose ECMAScript" s internal data representations on other programming languages. Instead, it shares a small subset of ECMAScript" s textual representations with all other programming languages.

so I"d like to ask:

  1. how do I store the method body in localStorage ?
  2. if you don"t save localStorage , is there any way to save this kind of data for a long time?

tostring when you detect that a value is function? But there are still a lot of problems

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4219d-4499f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4219d-4499f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?