Replies: 1 comment 1 reply
-
推荐自己用react context往下透传,你这种用法有点trick了 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
业务场景:第三方定义的图片上传组件中的action参数需要根据项目处于不同的环境 dev 、online 做出动态的调整,所以希望是可以在引用组件的地方将数据透传到第三方组件中
通过 useContext 是可以获取的,实现上是没有什么大问题的
但是 从TS的角度来看貌似 createSchemaField 只能传入 component 和 scope 两个key对应的参数,所以想问一下这是否是官方推荐的做法
Beta Was this translation helpful? Give feedback.
All reactions