Skip to content

StrictNullChecks is required to improve performance on large projects. #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
michaelangeloio opened this issue Feb 3, 2023 · 0 comments · Fixed by #163
Closed

StrictNullChecks is required to improve performance on large projects. #162

michaelangeloio opened this issue Feb 3, 2023 · 0 comments · Fixed by #163
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@michaelangeloio
Copy link
Contributor

michaelangeloio commented Feb 3, 2023

I've noticed that the tsconfig.json compiler property strictNullChecks need to be enabled to get proper IntelliSense performance on useQuery on a large project. The large project is an NX mono repo, for instance. This also happens for me with other hooks like useMutation when strictNullChecks is false.

Here's a TS compilation stack trace for the said project, with strictNullChecks: false:
Screenshot_2023-01-25_at_9 20 13_AM

Here's a TS compilation stack trace for the said project, with strictNullChecks: true:
Screenshot_2023-01-25_at_9 25 49_AM

As you can see, the call stack is much larger and the compilation time shortens by at least 2 seconds.

Other users have also reported similar issues on discord. Upon investigation, it seems that strictNullChecks is required as a part of zod: colinhacks/zod#1750

Until we dig deeper to see if we can resolve this on our end, I recommend updating the docs to reflect this.

@michaelangeloio michaelangeloio added bug Something isn't working documentation Improvements or additions to documentation labels Feb 3, 2023
@michaelangeloio michaelangeloio moved this to Todo in V3 Feb 3, 2023
@michaelangeloio michaelangeloio self-assigned this Feb 3, 2023
@michaelangeloio michaelangeloio moved this from Todo to In Progress in V3 Feb 3, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in V3 Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant