Add ref support to `Box`
Closes #52
This PR adds ref support to Box using the forwardRef API provided in React 16.
According to the docs, this should be treated as a breaking change:
When you start using forwardRef in a component library, you should treat it as a breaking change and release a new major version of your library.
https://reactjs.org/docs/forwarding-refs.html#note-for-component-library-maintainers
Alright, thanks for your work! Given that we‘re going to have a major release, shouldn‘t we add it to all components? Would love a PR update :) Not actively using the repo atm, so I have no time to do so
Thanks for the quick response! I'm happy to convert the other components.
Do you have thoughts on how to convert ScrollView? Specifically, how we should expose its instance methods, ie: getScrollPosition(), scrollTo(), scrollToStart(), and scrollToEnd()? Previously this was done with a ref on the React element, not the DOM node.
Heyhey. Sorry for not getting back for so long. Not sure if we'd want to have that for ScrollView as well then, since it's not a functional component after all. If you're still up to add that PR feel free to though :)