New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rescript-asyncdata

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rescript-asyncdata - npm Package Compare versions

Comparing version
1.1.1
to
2.0.0
+2
.gitattributes
*.res linguist-language=ReScript
*.resi linguist-language=ReScript
+6
-0

@@ -0,1 +1,7 @@

# 2.0.0
Changes:
- Remove paginated hook for now (347bfc9)
# 1.1.1

@@ -2,0 +8,0 @@

+1
-1
{
"name": "rescript-asyncdata",
"version": "1.1.1",
"version": "2.0.0",
"scripts": {

@@ -5,0 +5,0 @@ "clean": "bsb -clean-world",

@@ -131,2 +131,3 @@ # AsyncData

Return a record containing:
- `current`: after initial load, guaranteed to keep a `Done` state

@@ -154,22 +155,4 @@ - `next`: the reload request

### useAsyncPaginatedData
Simple async data with support for pagination.
Takes a `merge` function so that you can aggregate pages.
Return a record containing:
- `current`: after initial load, guaranteed to keep a `Done` state containing the aggregated data
- `next`: the next page request
```reason
let (data, setData) = useAsyncPaginatedData(~merge=Array.concat, ()) // {current: NotAsked, next: NotAsked}
setData(Loading) // {current: Loading, next: Loading}
setData(Done([1, 2, 3])) // {current: Done([1, 2, 3]), next: Done([1, 2, 3])}
setData(Loading) // {current: Done([1, 2, 3]), next: Loading}
setData(Done([4, 5, 6])) // {current: Done([1, 2, 3, 4, 5, 6]), next: Done([4, 5, 6])}
```
## Aknowledgments
This is heavily inspired by Elm's [krisajenkins/remotedata](https://github.com/krisajenkins/remotedata)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet