graphql-react
Advanced tools
Comparing version 8.0.1 to 8.0.2
# graphql-react changelog | ||
## 8.0.2 | ||
### Patch | ||
- Updated dev dependencies. | ||
- `useGraphQL` React hook bug fix for when arguments change after the initial render and the `load` function is called: `loading` and `cacheValue` now update correctly after the operation loads. | ||
## 8.0.1 | ||
@@ -4,0 +11,0 @@ |
{ | ||
"name": "graphql-react", | ||
"version": "8.0.1", | ||
"version": "8.0.2", | ||
"description": "A lightweight but powerful GraphQL client for React using modern context and hooks APIs; the first Relay and Apollo alternative with server side rendering.", | ||
@@ -68,3 +68,3 @@ "license": "MIT", | ||
"eslint-plugin-react": "^7.12.4", | ||
"eslint-plugin-react-hooks": "^1.0.2", | ||
"eslint-plugin-react-hooks": "^1.2.0", | ||
"formdata-node": "^1.4.1", | ||
@@ -79,5 +79,5 @@ "graphql": "^14.1.1", | ||
"prettier": "^1.16.4", | ||
"react": "^16.8.2", | ||
"react-dom": "^16.8.2", | ||
"react-test-renderer": "^16.8.2", | ||
"react": "^16.8.3", | ||
"react-dom": "^16.8.3", | ||
"react-test-renderer": "^16.8.3", | ||
"size-limit": "^0.21.1", | ||
@@ -84,0 +84,0 @@ "tap": "^12.5.3" |
@@ -100,16 +100,13 @@ 'use strict' | ||
_react.default.useEffect(function() { | ||
graphql.on('fetch', onFetch) | ||
graphql.on('cache', onCache) | ||
graphql.on('reset', onReset) | ||
return function() { | ||
graphql.off('fetch', onFetch) | ||
graphql.off('cache', onCache) | ||
graphql.off('reset', onReset) | ||
} | ||
}, []) | ||
_react.default.useEffect( | ||
function() { | ||
graphql.on('fetch', onFetch) | ||
graphql.on('cache', onCache) | ||
graphql.on('reset', onReset) | ||
if (loadOnMount) load() | ||
return function() { | ||
graphql.off('fetch', onFetch) | ||
graphql.off('cache', onCache) | ||
graphql.off('reset', onReset) | ||
} | ||
}, | ||
@@ -116,0 +113,0 @@ [cacheKey] |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79288
702