React-router: How to create a pinterest style modal in React Router v4

Created on 11 Oct 2016  路  6Comments  路  Source: ReactTraining/react-router

I was trying to make a modal like the pinterest modal (https://github.com/ReactTraining/react-router/tree/master/examples/pinterest) but felt short of any clever ideas on how to make them using v4.

Any one has successfully implemented one yet?

Most helpful comment

I would really love to see this example. So far I always end up with unnecessary re-rendering and data fetching by using children prop in component.

All 6 comments

You would put the modal flag in your location.state. That isn't transmitted to the URL, so it'll switch to undefined (a falsey) value when you refresh the page.

this is an example i've intended to have, just fyi

I would really love to see this example. So far I always end up with unnecessary re-rendering and data fetching by using children prop in component.

@gabrielbull Can you please send me your final solution? I will be very grateful.

A demonstration will be nice!

The example is now here

Please use canonical links

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ArthurRougier picture ArthurRougier  路  3Comments

ryansobol picture ryansobol  路  3Comments

nicolashery picture nicolashery  路  3Comments

davetgreen picture davetgreen  路  3Comments

jzimmek picture jzimmek  路  3Comments