How to test Callback call in useEffect with React Hooks Testing Library

后端 未结 0 1689
执笔经年
执笔经年 2021-01-31 22:03

I try to test a simple callback call in a useEffect hook:

export const useMyHook = (setState) => {
  useEffect(() => {
    fakeFetch().then((val) => setS         


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