Sticky main route with modal route (similar to reddit)

Hello,

What we need to do is quite similar to Reddit main/listing screen and post detail screen/modal. The idea is the main route should not be reloaded each time user close the route modal ( or detail screen). This is important to our client because main screen(s) … :

  • …can be a very long paginated list or a never ending scrolling list
  • user use the main route most of the time and likely return to it from otherRoute and expect data and scroll position unchanged

The project is currently using blaze with meteor/ostrio:flow-router-extra … it would be nice to have a solution for this router framework. But the architect is thinking about migrating to React in the future

Thanks,

Similar thread:

I guess this should be doable with react-router, see e.g. Examples / Nesting

And as you suggested, the detail component would be modal.

1 Like

Is this a react question or a blaze question?

1 Like

I updated my question:

For now, it is mainly blaze with meteor/ostrio:flow-router-extra … it would be nice to have a solution for this router framework. But the architect is thinking about migrating to React in the future

After googling for awhile I guess I may need to develop a solution on my own. But lacking of experience, I have no clue where to start. Any suggestions are appreciated

thanks

Have used slide-panel package it is similar to modal, but instead of modal one uses blaze template. It is not used as a route.