Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyComponent extends PureComponent {
- constructor(props) {
- if (this.props.cloudId) {
- this.props.fetchData(this.props.cloudId);
- } else {
- this.waitForCloudId = () => {
- if (this.props.cloudId) {
- this.props.fetchData(this.props.cloudId);
- } else {
- setTimeout(this.waitForCloudId, 100);
- }
- };
- setTimeout(this.waitForCloudId, 100);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement