Skip to content

useForceUpdate does not exists on type #98

@louiskhenghao

Description

@louiskhenghao

I got this error below after updating to the latest version, may I know if there any fix for the TypeScript?

Error

Type error: Property 'useForceUpdate' does not exist on type 'FC<FormBuilderInterface> & { defineWidget: (key: string, component: any, metaConvertor?: (field: FieldType) => FieldType) => void; }'.

const [form] = Form.useForm();
const forceUpdate = FormBuilder.useForceUpdate();
                               ^

Usage

const [form] = Form.useForm();
const forceUpdate = FormBuilder.useForceUpdate();

Temporary solution (Quick Fix)
Anyone facing this issue can actually pin the version to 2.1.2 since version 2.1.3 only added the TypeScript feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions