Create a gist now

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

Thanks!

@RafaelPlantard

This comment has been minimized.

Show comment
Hide comment

Thanks!

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