I realised: If I want to use hooks import { useQuery } from 'react-query'
I can only do that in React function components.
Do I have to rewrite my old class components in the React function syntax, or is there an easy way to use react-query with the class syntax?
I'm sure it's documented somewhere, but I could only find tutorials using React function components.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…