React-modal: How To Load URL in React Modal?

Created on 5 Jul 2017  路  2Comments  路  Source: reactjs/react-modal

  • I am interested in displaying a remote URL in my react modal

  • I may get data of that URL using AJAX call but how may I render that exact URL in my modal?

  • Any help would be appreciated...

Most helpful comment

There are a few options:

1. Make an request and save the data on some state. Render in the Modal afterwards.

You can execute when opening the modal or use onAfterOpen.

2. Add an iframe on the modal.

All 2 comments

There are a few options:

1. Make an request and save the data on some state. Render in the Modal afterwards.

You can execute when opening the modal or use onAfterOpen.

2. Add an iframe on the modal.

Thanks @diasbruno ...
Your option 2 was easy to pursue.
I used iframe on the modal and
window.open(link,'NewWindow','resizable=yes'); without modal

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tairy-potter picture tairy-potter  路  3Comments

shaun-sweet picture shaun-sweet  路  3Comments

leoasis picture leoasis  路  4Comments

petertdinh picture petertdinh  路  4Comments

c0debreaker picture c0debreaker  路  4Comments