Skip to content

Instantly share code, notes, and snippets.

@geetotes
Created December 31, 2016 22:44
Show Gist options
  • Save geetotes/75cceba2a44d2f4893de2bc6de53c912 to your computer and use it in GitHub Desktop.
Save geetotes/75cceba2a44d2f4893de2bc6de53c912 to your computer and use it in GitHub Desktop.
class PrettyLoader extends React.Component {
constructor() {
this.state = {
loading: false
};
}
render() {
let loaderStyles = classNames({
'hidden': this.state.loading
});
return(
<div>
<div className={loaderStyles} />
{this.props.children}
</div>
</div>
)
}
}
@Lokua
Copy link

Lokua commented May 12, 2017

Hi. Need to not self-close the opening tag of the inner div.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment