'how to Declare a custom type on Next.js NextPageContext?
N Next JS version: 11, I add a custom NextPageContext type for typescript!
following this three step:
BUT in Next JS version: 12, I want to add same custom NextPageContext type for typescript; Bt is throw a ERROR 'Property 'isMobile' does not exist on type 'NextPageContext'.ts(2339)'; so how can i add Custom type in NextPageContext??
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|