Hashrouter refresh error, this.props.location.state is undefined

I jump from page A to page B with parameters

this.props.history.push({ pathname: "/send_msg", state: { query: obj } })

you can get this.props.location.state
clipboard.png

Bthis.props.location.stateundefined

clipboard.png

on the B page at this time.
May.20,2022

refresh will definitely report an error, because your parameters were brought from the previous page. The correct way is to use routing parameters, which can be placed in query. If the parameters are saved in url, you are not afraid to refresh the


this hashrouter pit, and you need to convert historyRouter.
reference: https://stackoverflow.com/que...

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-1e9949d-1741.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-1e9949d-1741.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?