React Tutorial - 19.history
1.single page application a.multiple pages application(old version websites) -- navigate between views by urls/htmls, change views by going to another page b.single page application -- only one html file existing, navigate between views by componenting or unmounting components. 2.BOM vs DOM a.BOM(treat browser as a window object) -- screen/history/document/frame -- these are intefaces that we can interact with browser, but these interafaces are not user friendly. b.DOM(treat webpage as a document object, this is also a property of window object) --title/header/body c.we use javascript to interact with dom so that we can manipulate BOM eventually 3.front-end route vs back-end route a.back end route aa.send request url to the back end to match the resource bb.generate resource dynamically from backend to match the url b.front end route -- change url to match resource from frontend without refreshing the page aa.H5 history APIs -- browser history bb.hash value -- hash history 4.history a.import history library b.push and replace -- history records has been stored in the stack c.monitor url chages d.open a html file from local or localhost e.browser history vs hash history --react recommend using browser history to implement front end routing
Download
0 formatsNo download links available.