react-stepzilla
react-stepzilla copied to clipboard
React ref does not work as intended
Working with this library I faced an weird issue in which it was not properly defining the ref. It happened because react changed how to work with the refs: https://reactjs.org/docs/refs-and-the-dom.html
In my fork I changed the src/main.js line from:
cloneExtensions.ref = 'activeComponent';
to:
cloneExtensions.ref = (el) => { this.activeComponent = el; };
I had to change how we were validating the activeComponent property in a few places, but then it worked just fine.
I can create a proper pull request for it if you guys want to.
how things go on? @kaiomagalhaes