Answer the question
In order to leave comments, you need to log in
Pass modal window by reference?
There is a button:
const WeatherPageJumbotronButton=()=> {
return(
<a className="btn btn-primary btn-lg " role="button">
Choice country
</a>
)
}
const ModalWindowFromWeatherPageButton=(props)=>{
const {Weather}=props
const ShowMeCountry=<section>{Weather.country}</section>;
return(
<div className="modal" tabIndex="-1" role="dialog">
<div className="modal-dialog" role="document">
<div className="modal-content">
<div className="modal-header">
<ul>
<li>{ShowMeCountry}</li>
</ul>
<button type="button" className="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div className="modal-body">
<ul>
<li></li>
</ul>
</div>
<div className="modal-footer">
<button type="button" className="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" className="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
)
}
Answer the question
In order to leave comments, you need to log in
It is possible through #anchor
JS code to parse the current URL and create a modal window if it does not exist.
And in the general case, if you need a link, then it's better not to make a modal window, IMHO.
Read about what a dropdown select is. Well, you should use it.
Regarding the second question, read about what client routing is. The standard in React development is react-router .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question