Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rest-hooks

Package Overview
Dependencies
Maintainers
1
Versions
328
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rest-hooks - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

lib/connect/context.d.ts

95

package.json
{
"name": "rest-hooks",
"version": "0.0.1",
"description": "Hooks for rest APIs",
"version": "0.0.2",
"description": "Easy react hooks for REST apis",
"sideEffects": false,
"main": "lib/index.js",
"module": "lib/index.js",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
"lib"
],
"scripts": {
"build:lib": "NODE_ENV=production babel src --out-dir lib --source-maps inline --extensions '.ts' --ignore '**/__tests__/**'",
"build:types": "tsc --emitDeclarationOnly -p ./src",
"build:clean": "rimraf lib",
"build": "npm run build:clean && npm run build:lib && npm run build:types",
"prepare": "npm run build:clean && npm run build",
"lint": "eslint src",
"test": "bnr run-test",
"test:watch": "npm test -- --watch",
"coverage": "bnr run-coverage --silent"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/ntucker/anansi-fetch.git"
},
"bugs": {
"url": "https://github.com/ntucker/anansi-fetch/issues"
},
"homepage": "https://github.com/ntucker/anansi-fetch#readme",
"keywords": [
"anansi",
"rest",
"react",
"redux",
"immutable",
"immutablejs",
"ajax",

@@ -15,3 +42,63 @@ "networking"

"author": "Nathaniel Tucker",
"license": "BSD"
"license": "BSD",
"betterScripts": {
"run-test": {
"command": "jest",
"env": {
"NODE_ENV": "test",
"NODE_PATH": "./src"
}
},
"run-coverage": {
"command": "nyc better-npm-run run-test --silent --reporter min",
"env": {
"NODE_ENV": "test",
"NODE_PATH": "./src"
}
}
},
"nyc": {
"include": [
"src"
]
},
"devDependencies": {
"@anansi/babel-preset": "0.11.1",
"@anansi/eslint-config": "^0.5.2",
"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2",
"@types/jest": "^23.3.13",
"@types/nock": "^9.3.0",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^23.6.0",
"better-npm-run": "^0.1.1",
"enzyme": "^3.8.0",
"enzyme-adapter-react-16": "^1.7.1",
"eslint": "^5.12.1",
"flow-bin": "^0.88.0",
"flow-copy-source": "^2.0.2",
"flow-typed": "^2.5.1",
"ignore-styles": "^5.0.1",
"jest": "^23.6.0",
"nock": "^10.0.6",
"nsp": "^3.2.1",
"nyc": "^13.1.0",
"prop-types": "^15.6.2",
"react": "16.8.0-alpha.1",
"react-immutable-proptypes": "^2.1.0",
"sinon": "^7.2.3",
"ts-jest": "^23.10.5",
"typescript": "^3.2.4"
},
"dependencies": {
"@types/react": "^16.7.20",
"@types/superagent": "^3.8.6",
"flux-standard-action": "^2.0.3",
"normalizr": "^3.3.0",
"qs": "^6.6.0",
"superagent": "^4.1.0"
},
"peerDependencies": {
"react": "16.8.0-alpha.1"
}
}

35

README.md
# Rest hooks: Data fetching and binding hooks
Rest hooks builds on the core tenants of REST to make dynamic sites easy, performant, and scalable.
## Getting Started
* [Installation](docs/getting-started/installation.md)
* [Usage](docs/getting-started/usage.md)
## API
* Model:
* State:
* [ModelResource](docs/ModelResource.md)
* mixins
* createModelRegistry
* registerModel
* reducer
* Hooks:
* connect
* fetch
* mutate
* block
* selectResource
* fetchResource
* useResource
## Patterns & Examples
* Basics
* Awaiting resolution of API calls
* Usage with redux-form
* Inheritance with ModelResource
* [Cross-orgin requests with JSONP](docs/guides/jsonp.md)
* Authentication
* Performance Optimizations (optional)
* [Nesting related resources (server-side join)](docs/guides/nested-response.md)
* Batching related resources (client-side join)
* Reducing overfetching
* Optimistic query update on create
* Cross-resource multi-update RPC
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc