-1

My project is with a react and I don't want to use jquery plugins, tell me is there any possibility

  • You mean ``? If yes. Same way as video or iframe: https://stackoverflow.com/questions/15844500/shrink-a-youtube-video-to-responsive-width/15844571#15844571 – 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 Answers1

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.