-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I close the loader within the component? #3
Comments
Hi @willemevenwel , Here is a codesandbox example https://codesandbox.io/s/old-tree-tdif9?file=/src/App.js for showing loader for a certain amount of time. I have used a loading state variable and set the loading to false after 3 seconds. Happy to help if you need more. |
Bro, you are an absolute star!! Thanks so much. |
In essence I completely understand. But I want to implement this on the Loading component, not on the parent component using the Loading component. |
This is a very simple library and I wanted to keep it simple so that it is easily customisable. You can easily copy paste the lib/loading.js and lib/style.css to your react project and customise it. |
Hi,
I have included your library as suggestion in code as a component. I would like the loader to close itself after a certain amount of time has passed. The loader shows because of the property assigned to this.props.loading, however, I can not set that property after a delay, because of the inaccessibility of props.
Your guidance would be appreciated.
Regards,
Willem
The text was updated successfully, but these errors were encountered: