Hi,
Following line, i believe is an invalid hook call. The problem was that useCallback was being returned directly without being defined as a constant first. When i copied the index.ts file into my project and changed the code to define useCallback as a const before returning it, the error was resolved.
https://github.com/immerjs/use-immer/blob/master/src/index.ts#L19-L22
Hi,
Following line, i believe is an invalid hook call. The problem was that useCallback was being returned directly without being defined as a constant first. When i copied the index.ts file into my project and changed the code to define useCallback as a const before returning it, the error was resolved.
https://github.com/immerjs/use-immer/blob/master/src/index.ts#L19-L22