// eslint-disable-next-line no-use-before-define import React, { Component } from 'react' import Home from '@src/pages/home/Home' // Cannot find module '@src/pages/home/Home' or its corresponding type declarations.ts(2307) import Index from '@src/pages/index/Index' // 上面报错需要在tsconfig设置path属性为对应的别名 import bizhi from '../public/bizhi.jpg' import './App.less' interface IState { name: string } interface IProps { appName: 'react ts template' } export default class App extends Component { constructor (props: IProps) { super(props) this.state = { name: 'app', } } onClick = () => { console.log('测试点击') } render () { return ( <>
this is react template with typescript. {/* 根据webpack-dev-server static静态资源目录访问 */} {/* 使用图片打包 */}
) } }