I\'m using react-router 1.0 and their integration of history.
import { createHistory, useBasename } from \'history\'
The state is on location
so, you can access it via props
if it's your route component: this.props.location.state
or get the location
object of the context.
Check out Pinterest example in the v3 docs, which is doing exactly what you want.
edit: Here is the link to the example in React Router v4: https://reacttraining.com/react-router/web/example/modal-gallery