I've got a simple component that was working in earlier versions of admin-bro, but now that I've updated and added in design-system, etc. useRecord refuses to work and gives the error in the title. The import is:
import {
Box,
useRecord,
useTranslation
} from '@admin-bro/design-system'
The page throws a Javascript error:
Uncaught TypeError: designSystem.useRecord is not a function
at AltuserComponent (components.bundle.js:1103)
at renderWithHooks (global.bundle.js:37614)
at mountIndeterminateComponent (global.bundle.js:40293)
at beginWork (global.bundle.js:41407)
at HTMLUnknownElement.callCallback (global.bundle.js:22999)
at Object.invokeGuardedCallbackDev (global.bundle.js:23048)
at invokeGuardedCallback (global.bundle.js:23103)
at beginWork$1 (global.bundle.js:46014)
at performUnitOfWork (global.bundle.js:44968)
at workLoopSync (global.bundle.js:44941)
I've got a simple component that was working in earlier versions of admin-bro, but now that I've updated and added in design-system, etc. useRecord refuses to work and gives the error in the title. The import is:
import { Box, useRecord, useTranslation } from '@admin-bro/design-system'
Then using it as:
const { record: initialRecord, resource, action, property } = props const { record, handleChange, submit } = useRecord(initialRecord, resource.id)
The page throws a Javascript error: Uncaught TypeError: designSystem.useRecord is not a function at AltuserComponent (components.bundle.js:1103) at renderWithHooks (global.bundle.js:37614) at mountIndeterminateComponent (global.bundle.js:40293) at beginWork (global.bundle.js:41407) at HTMLUnknownElement.callCallback (global.bundle.js:22999) at Object.invokeGuardedCallbackDev (global.bundle.js:23048) at invokeGuardedCallback (global.bundle.js:23103) at beginWork$1 (global.bundle.js:46014) at performUnitOfWork (global.bundle.js:44968) at workLoopSync (global.bundle.js:44941)
Any idea what I'm doing wrong?