import Taro, { useLoad } from '@tarojs/taro'
import React from 'react'
import { View } from '@tarojs/components'
import Demo from '@/pages/components/demo/index'
import './index.less'

// console.log(Demo)
// debugger

const myPluginInterface = Taro.requirePlugin('myPlugin')

const Index: React.FC = () => {
  useLoad(() => {
    myPluginInterface.sayHello()
    const answer = myPluginInterface.answer
    console.log('answer: ', answer)
  })

  function hasCllick() {
    console.log('hasCllick')
  }

  return (
    <View className='index'>
      {/* <Demo width="123"></Demo> */}
      <custom width="1000" props={{width: "300"}} onClick={hasCllick}/>
    </View>
  )
}

export default Index
