5 Replies
Hi @PKalib. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
It seems like you are encountering an issue where
useLogin
is not recognized as a function. This could be due to a few reasons, such as incorrect import statements or usage. Let's go through the correct way to use useLogin
in a refine application.
Correct Usage of useLogin
1. Importing useLogin
:
Make sure you are importing useLogin
from @refinedev/core
correctly.
2. Using useLogin
in a Component:
Here is an example of how to use useLogin
in a custom login page component:
This example demonstrates how to set up a login form using useLogin
from @refinedev/core
. Make sure that the @refinedev/core
package is installed in your project.
3. **Handling
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@329809837338656770> kapa.ai is still learning and improving, please let us know how it did by reacting below
metropolitan-bronze•4mo ago
im using nextjs
⨯ TypeError: (0 , _mantine_formWEBPACK_IMPORTED_MODULE_3.useForm) is not a function
at Login (./src/app/login/page.tsx:21:72)
digest: "3904641522"
@kapa.ai im using nextjs
⨯ TypeError: (0 , mantineform__WEBPACK_IMPORTED_MODULE_3.useForm) is not a function
at Login (./src/app/login/page.tsx:21:72)
digest: "3904641522"
Let me check the knowledge base for you. One moment! :books:
----------------------
It looks like you are encountering an issue where
useForm
from the @mantine/form
library is not recognized as a function in your Next.js application. This could be due to incorrect import statements or usage. Let's go through the correct way to use useForm
with Mantine in a refine application.
Correct Usage of useForm
with Mantine
1. Importing useForm
:
Make sure you are importing useForm
correctly from @mantine/form
.
2. Using useForm
in a Component:
Here is an example of how to use useForm
in a component:
3. Running the Example Locally:
You can run the example locally by using the following command:
4. Viewing the Example on CodeSandbox:
You can also try the example on CodeSandbox:
![Open form-mantine-use-form example from refine (https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/embed/github/refinedev/refine/tree/master/examples/form-mantine-use-form?view=preview&theme=dark&codemirror=1)
By following these steps, you should be able to resolve the issue with useForm
in your Next.js application. If the problem persists, ensure that all dependencies are correctly installed and up-to-date.
For more detailed information, you can refer to the useForm hook documentation (https://refine.dev/docs/ui-integrations/mantine/hooks/use-form/).
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@329809837338656770> kapa.ai is still learning and improving, please let us know how it did by reacting below