React-Delay-Render
A small component that delays the rendering of components.
Usage
Download the package from npm with
npm i -S react-delay-render
;;const SmallRow =<div className="row">...</div>;delay: 500 SmallRow;
Argument Object
The Higher order component takes in two arguments, delay and a callback onRender
Delay
You can use the delay on the delayed component and the children as well.
;const Delayed =<MyDelayedComponent><MyOtherDelayedComponentChild /></MyDelayedComponent>;delay: 200 Delayed;
onRender
A callback that is triggered when the rendering has started
;const render = {console;};const ExampleTwo =<DelayedComponent><MyComponent /></DelayedComponent>;delay: 500 onRender: renderExampleTwo