If your input is added dynamically, as it was for me, you need to call the function in the componentDidUpdate function.
Also, you are likely to get class input instead of refs.
componentDidUpdate() { $('.toggleInput').bootstrapToggle(); }
And further:
<input className="toggleInput" type="checkbox" checked data-toggle="toggle">
source share