Skip to content

🧐[问题]@ant-design/cssinjs V1 升级V2 useStyleRegister 不返回wrapSSR ,如何升级 #206

@faner11

Description

@faner11

🧐 问题描述

formily antd 现在已经无人维护,我计划将它升级到Antd 6,一切都很顺利,但是升级@ant-design/cssinjs V2时,因为useStyleRegister不再返回wrapSSR函数,我不知道如何修改,formily antd 当前的写法应该是antd 5早期的写法,你们可以给我一些指导吗,或者帮我将其中一个组件改为新的写法,其他组件我来改。

💻 示例代码

代码仓库: https://github.com/faner11/antd-sync
核心代码在此文件:packages/components/builtins/style.ts

🚑 其他信息

// 每个组件都包含这样的代码
const [wrapSSR, hashId] = useStyle(prefixCls)
return wrapSSR(...)

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