Navigation Menu

Skip to content

Commit

Permalink
Remove unused code (#184)
Browse files Browse the repository at this point in the history
* remove unused code

* remove coverage thresholds
  • Loading branch information
cherniavskii committed Mar 2, 2020
1 parent 99e0299 commit b0617ae
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
8 changes: 0 additions & 8 deletions jest.config.js
@@ -1,12 +1,4 @@
module.exports = {
"coverageThreshold": {
"global": {
"branches": 65.38,
"functions": 67.65,
"lines": 72.75,
"statements": 71.54
}
},
collectCoverage: true,
coverageReporters: ["json", "lcov", "text", "clover", "text-summary"]
}
6 changes: 0 additions & 6 deletions src/useBaseQuery.js
Expand Up @@ -24,7 +24,6 @@ export function useBaseQuery(queryKey, queryVariables, queryFn, config = {}) {
let query = queryCache._buildQuery(queryKey, queryVariables, queryFn, config)

const [queryState, setQueryState] = React.useState(query.state)
const isMountedRef = React.useRef(false)
const getLatestConfig = useGetLatest(config)
const refetch = React.useCallback(query.fetch, [query])

Expand Down Expand Up @@ -78,11 +77,6 @@ export function useBaseQuery(queryKey, queryVariables, queryFn, config = {}) {
refetch,
])

// Reset refs
React.useEffect(() => {
isMountedRef.current = true
})

if (config.suspense) {
if (queryState.status === statusError) {
throw queryState.error
Expand Down

0 comments on commit b0617ae

Please sign in to comment.