This is the first day I've used react-test-renderer, and I've already stumbled upon three problems:
react-test-renderer is going to be shipped with create-react-app very soon (?) (it's in react-test-renderer@0.3.0-alpha), so I think it deserves some more comprehensive documentation as soon as possible. With at least some troubleshooting bulletpoints and some text about how one are supposed to do with refs.
I sometimes use refs from componentDidMount. For example for setting focus on an input this.refs.input.focus(). But such code will fail with cannot call focus() on undefined. Should we always test if a ref isn't undefined before using them? Or do you have some plans for react-test-renderer in near future that will solve this issue in some way?
This is the first day I've used
react-test-renderer, and I've already stumbled upon three problems:injectEnvironmentcalled twice:react-test-rendererandreact-dom#7386nullwhen rendered withreact-test-rendererReactTestRenderer doesn't work with refs or ReactDOM.findDOMNode #7371react-test-rendereris going to be shipped withcreate-react-appvery soon (?) (it's inreact-test-renderer@0.3.0-alpha), so I think it deserves some more comprehensive documentation as soon as possible. With at least some troubleshooting bulletpoints and some text about how one are supposed to do with refs.I sometimes use refs from
componentDidMount. For example for setting focus on an inputthis.refs.input.focus(). But such code will fail withcannot call focus() on undefined. Should we always test if a ref isn't undefined before using them? Or do you have some plans forreact-test-rendererin near future that will solve this issue in some way?