Skip to content

Instantly share code, notes, and snippets.

@TobyEalden
Created April 13, 2016 22:34
Show Gist options
  • Save TobyEalden/68f66cfefaed4b2c90bd4a5b9df39f84 to your computer and use it in GitHub Desktop.
Save TobyEalden/68f66cfefaed4b2c90bd4a5b9df39f84 to your computer and use it in GitHub Desktop.
import React from "react";
import RefreshIndicator from "material-ui/lib/refresh-indicator";
class RefreshIndicatorBroken extends React.Component {
constructor() {
super();
this.state = {
showRefresh: true
};
}
componentDidMount() {
var self = this;
setTimeout(function() {
self.setState({showRefresh: false});
},5000);
}
render() {
if (this.state.showRefresh) {
return <RefreshIndicator left={300} top={300} status="loading" />;
} else {
return <div>no refresh - but timer still running</div>;
}
}
}
export default RefreshIndicatorBroken;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment