My project is with a react and I don't want to use jquery plugins, tell me is there any possibility
Asked
Active
Viewed 79 times
-1
-
You mean ` – Arseniy-II Nov 19 '19 at 08:41
-
What do you mean by map? What does that have to do with jQuery plugins? – lomse Nov 19 '19 at 09:45
-
http://jsfiddle.net/p7EyT/ Hope this will help you – Priyanka Nov 19 '19 at 09:55
-
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. – Paulie_D Nov 19 '19 at 10:25
1 Answers
0
Your post is not very descriptive, but you can always use an event listener to adjust your map like
state = {
windowHeight: undefined,
windowWidth: undefined
}
handleResize = () => this.setState({
windowHeight: window.innerHeight,
windowWidth: window.innerWidth
});
componentDidMount() {
this.handleResize();
window.addEventListener('resize', this.handleResize)
}
componentWillUnmount() {
window.removeEventListener('resize', this.handleResize)
}
Then just use the height and width from state to style your map, make sure to remove it when the page unmounts.

Fried noodles
- 125
- 6