useEffect infinite loop occurs only while testing, not otherwise - despite using useReducer

后端 未结 0 2004
清歌不尽
清歌不尽 2021-01-12 08:38

I\'m trying to test a useFetch custom hook. This is the hook:

import React from \'react\';

function fetchReducer(state, action) {
  if (action.type === `fetc         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题