2

I would like a React component to be responsive to an external state, in this case the size of the viewport. Do I accomplish this internally to my component or do I do a media query which passes the viewport as a size property to the initial render?

Kamuela Franco
  • 686
  • 1
  • 5
  • 16

1 Answers1

4

Take a look at this project: https://github.com/wearefractal/react-responsive, it seems to be exactly what you need.

Eelke
  • 2,267
  • 1
  • 22
  • 26