Getting error when creating a new hook inside refine-core

I have created a new hook inside refine-core/hooks. now I tried to use it inside core-select-example. but its showing module not found. I looked inside the folder and it's there. Can't figure it out. I am using the repo.
No description
No description
2 Replies
rival-black
rival-black16mo ago
Hi @sebabratakundu, Your import path doesn't seems correct. you can export your hook from here: https://github.com/refinedev/refine/blob/next/packages/core/src/index.tsx and import like that import {useDocumentTitle} from "@pankod/refine-core" sorry, actually all /hooks folder is already exported. you can export from here: https://github.com/refinedev/refine/blob/next/packages/core/src/hooks/index.ts and import like that import {useDocumentTitle} from "@pankod/refine-core"~~ For the integrity of the project, the folder structure of all hooks should be the same. Also, it will be the easy to export like this
fascinating-indigo
fascinating-indigo16mo ago
thanks @alicanerdurmaz .