SherylHohman / ReactND-C3-Project2-Readable

BSD 2-Clause "Simplified" License
1 stars 0 forks source link

refactor to use history.GoBack instead of saving prevUrl #77

Closed SherylHohman closed 6 years ago

SherylHohman commented 6 years ago

One of the components acceses store at first mount to get the url from the "previous" page (in mapStoreToProps) so that if the user "Cancels" they can be returned to the previous Page.

but history.GoBack already has this info.

Simplify my code by using this function instead of history.push(prevUrl) plus all the extra (breakable) brittle code to save, but not overwrite the prevUrl.