DEV Community

Discussion on: How to create a preloader in ReactJS?

Collapse
 
victormagarlamov profile image
Victor Magarlamov

You can do it easily with HOC. Create a function that will take the tab component as a parameter. If the data is not loaded, you show your preloader component, when the data is loaded - it shows your tab component.
For example - github.com/victor-magarlamov/maiof...

Collapse
 
toughyear profile image
Rajeev Singh Naruka

thanks for the reply, but I couldn't quite understand what you mean by tab component. Have a look at the site I mentioned brittanychiang.com, the splash screen/preloader on page first load is what I am talking about. Thanks for your time.