Ricky Jiao
Ricky Jiao
Support `className` and `styles` props
I have a project A needs to reference font-awesome on other server. We already setup everything(CSS file, font location, CORS header). Everything works fine in IE8 via HTTP. However, when...
### 背景介绍 我想在taro小程序里面使用一些自定义的react-provider。但是小程序里面没有一个root component, 不同的页面渲染在不同的上下文。在taro里面,很难像react里面一样使用provider。我参考了官方的taro-redux的实现方式,把provider的context 存放在global对象里面。考虑到这个是一个非常通用的问题,我决定把相关代码剥离成一个单独的npm module 方便其他人使用。这个是我创建的帮助类库 https://github.com/RickyJiao/taro-provider ### 问题描述 创建taro-provider帮助类库的时候,遇到了打包问题。我不太了解taro-cli是否支持把代码打包成一个npm module么? 我用了webpack+bable进行打包。 `taro.component.d.ts`无法通过ts的type check。 React.ReactElement是一个泛型接口。但是我们在`taro.component.d.ts`内没有指定任何类型,导致ts-check无法通过。参考如下截图: 我目前的办法:手动修改`node_modules/@tarojs/taro/types/taro.component.d.ts`。 修改如下: ```jsx interface FunctionComponent { (props: PropsWithChildren, context?: any): React.ReactElement | null...
I google this issue and have not found the same or similar one. If there is already one before. Please mention it here and close this one! #### steps to...