Closed iagobruno closed 5 years ago
My app is complaining in the console about a hooks error:
But I went to investigate and my components are following the rules for hooks described in the React documentation. I looked deeper and I discovered that the errors are in your package, specifically in these lines:
https://github.com/troch/reinspect/blob/4f3a562ae0d6bf6ee9198362b21d224a304315d5/src/useReducer.ts#L71-L74
https://github.com/troch/reinspect/blob/4f3a562ae0d6bf6ee9198362b21d224a304315d5/src/useState.ts#L12-L15
https://github.com/troch/reinspect/blob/e682221e0336df10a51ff9c7e1c24c7054c3b1fb/src/useState.ts#L18-L20
https://github.com/troch/reinspect/blob/e682221e0336df10a51ff9c7e1c24c7054c3b1fb/src/useReducer.ts#L77-L79
I tried to fix it for you but you're going to have to rewrite a part of the code.
Hello, should be fixed now with v1.0.0 (warning appeared in v16.8.0 of React).
My app is complaining in the console about a hooks error:
But I went to investigate and my components are following the rules for hooks described in the React documentation. I looked deeper and I discovered that the errors are in your package, specifically in these lines:
https://github.com/troch/reinspect/blob/4f3a562ae0d6bf6ee9198362b21d224a304315d5/src/useReducer.ts#L71-L74
https://github.com/troch/reinspect/blob/4f3a562ae0d6bf6ee9198362b21d224a304315d5/src/useState.ts#L12-L15
https://github.com/troch/reinspect/blob/e682221e0336df10a51ff9c7e1c24c7054c3b1fb/src/useState.ts#L18-L20
https://github.com/troch/reinspect/blob/e682221e0336df10a51ff9c7e1c24c7054c3b1fb/src/useReducer.ts#L77-L79
I tried to fix it for you but you're going to have to rewrite a part of the code.