Skip to content

[taro4-solid]taro-components的solid jsx类型报错,solid createStore使用不了等问题 #16357

Description

@phy-lei

相关平台

微信小程序

小程序基础库: 3.3.2
使用框架: Solid

问题汇总

  1. taro-components的solid jsx类型报错
    image
  2. solid的createStore使用不了
    image

复现步骤

import { createStore } from 'solid-js/store'
import { View } from "@tarojs/components";

export default function Index () {
  const [state, setState] = createStore({
    firstName: "John",
    lastName: "Miller",
  });
  useLoad(() => {
    console.log('Page loaded.')
  })

  return (
    <View className='index'>
      <Text>Hello world!</Text>
    </View>
  )
}

期望结果

View组件不爆红,并且有类型提示

实际结果

View组件爆红

环境信息

Taro CLI 4.0.4 environment info:
    System:
      OS: macOS 14.0
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 20.12.1 - ~/.nvm/versions/node/v20.12.1/bin/node
      Yarn: 1.22.22 - ~/.nvm/versions/node/v20.12.1/bin/yarn
      npm: 10.5.0 - ~/.nvm/versions/node/v20.12.1/bin/npm
    npmPackages:
      @tarojs/cli: 4.0.4 => 4.0.4 
      @tarojs/components: 4.0.4 => 4.0.4 
      @tarojs/helper: 4.0.4 => 4.0.4 
      @tarojs/plugin-framework-solid: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-alipay: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-h5: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-harmony-hybrid: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-jd: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-qq: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-swan: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-tt: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-weapp: 4.0.4 => 4.0.4 
      @tarojs/runtime: 4.0.4 => 4.0.4 
      @tarojs/shared: 4.0.4 => 4.0.4 
      @tarojs/taro: 4.0.4 => 4.0.4 
      @tarojs/taro-loader: 4.0.4 => 4.0.4 
      @tarojs/webpack5-runner: 4.0.4 => 4.0.4 
      babel-preset-taro: 4.0.4 => 4.0.4 
      eslint-config-taro: 4.0.4 => 4.0.4 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    F-reactFramework - ReactT-weappTarget - 编译到微信小程序V-3Version - 3.x

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions