pushState: what exactly is the state object for?

后端 未结 2 626
借酒劲吻你
借酒劲吻你 2020-12-12 18:08

I\'ve read a dozen of times now that the state object could exists of multiple key|value pairs and that it is associated with the new history entry. But could someone please

2条回答
  •  感动是毒
    2020-12-12 18:32

    Is a specific and forward looking use case the maintenance of user view and data state in a progressive app using custom elements and templates that are divided up in the view regionally

    Imagine a 64 box grid as your view, on a large screen the boxes are 147 ^2 a piece

    The url represents 64/ a user ID abs related user data

    The web app can then fill its grid with user specific state data

    In this use case, one I fully believe is the future, the user wouldn't want to share his or her personal state and data filled view portions

    By using previous history states and their related 650k of data

    A whole, complex app can be, reassembled from browser history and location, including state, using a few well known sort approaches.

    It's cool

提交回复
热议问题