Instantly share code, notes, and snippets.

Embed
What would you like to do?
Solution for "Unexpected use of 'location'" React error.
React: Unexpected use of 'location';

Solution: Use window.location instead of bare location.

@Hongbo-Miao

This comment has been minimized.

Show comment
Hide comment
@Hongbo-Miao

Hongbo-Miao commented Dec 22, 2017

Thanks!

@RafaelPlantard

This comment has been minimized.

Show comment
Hide comment
@RafaelPlantard

RafaelPlantard commented Feb 14, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment