You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(interval-update): Component to update children components at intervals (#58)
* Implement higher order update on interval component, prepub hook
* syntax fix
* add support for custom decorator
* chore(release): 1.42.5-update-interval.0
* Export update on interval
* chore(release): 1.42.5-update-interval.1
* add runtime generators to support async
* chore(release): 1.42.5-update-interval.2
* add options to "@babel/plugin-transform-runtime"
* helpers set to false
* add @babel/runtime for runtime support
* Update doc
@@ -383,6 +385,7 @@ import { ResponsiveSource } from '@quintype/components';
383
385
imgParams={{auto:['format', 'compress']}}/>
384
386
</picture>
385
387
</figure>
388
+
386
389
```
387
390
388
391
### SearchPageBase
@@ -562,6 +565,46 @@ import { ReviewRating } from '@quintype/components';
562
565
```
563
566
The component supports additional props which allows more customization, you can pass in props like size, color, count of stars or even change the render from star to a custom svg component. Refer to component src to know exact details of what is supported.
564
567
568
+
569
+
### UpdateOnInterval
570
+
571
+
Serves as a wrapper used to update it's children via props while executing data loaders sent as props to the component.
572
+
573
+
Note : Dataloaders are made to be at an app level to keep the component generic, the return of Dataloaders are sent as props to its children.
`interval`| `number`(ms) | Sets the time, defaults to 30s | True
586
+
`dataLoader`| `func` | Executes the dataloader, the return of which will be the data to the components children. The return should be an `object` | False
587
+
`dataDecorator`| `func` | Sends the data from `dataLoader` to be customized, return of this this will be passed to the children. (`dataKey` is neglected if set) | False
588
+
`dataKey`|`string`|The data returned from dataLoader will be decorated with this key, if not set dataLoader sends back data as returned | False
0 commit comments