React-router3

Source: Internet
Author: User

Tags: switch browser oca COM related name push Pat Route

Use H5 's history.pushstate (add New) and history.replacestate (replace current) to manipulate the history stack

Spa

Advantages     - experience a good local refresh    disadvantage -browser forward back will resend the request, did not take advantage of the cache

Hash value

hash value unique Irreversible resolution history issue     - #后面的字符串: Fragment identifier (hash URL) H5 provides two APIs     - window.location.hash         -Takes the # start string         - can change without adding #     // callback Listener Hash Change

React-router

Related Components-Router router components, including other components, explorer home-History ={Hashhistory} listens for changes in the browser address bar, resolves URLs to an address object-Sub-component route-Route routing component, registering routing-Path="/xxx" //the requested address-Component={XXX}-indexroute Default Routing component-hashhistory routing switching by URL hash change-Link routing link component, generate <a>-to="/xxx"-Activename="Active"//classname of the highlighted state

React-router3

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

Tags Index: