When react + typescript, use the modifier to compile the error?

function dectest(target: any) {
    target.prototype.name = "isfufeng"
}

@dectest
export default class Home extends React.Component<Props, State> {
    constructor(props: any) {
        super(props)
    }
}

first, I used this to add a name class to it, but there was an error in the compilation time

.
Module not found: Error: Can"t resolve "babel-runtime/core-js/reflect/metadata" in "d:\allpro\reactdom\reactM\reactAdmin\src\components\home"

is followed by the connect method of react-redux.


  "ComponentClass<Pick<any, never>> & { WrappedComponent: ComponentType<any>; }" "typeof Home" 
    "Component<Pick<any, never>, ComponentState>" "Home" 
      "componentDidMount" "Component<Pick<any, never>, ComponentState>" "Home" 

added

to .babelrc
"plugins": [
        "react-hot-loader/babel",
        "transform-decorators-legacy",
        "transform-runtime",
        "transform-class-properties"
    ],

there are great gods who know how to solve it.


Hello, has this been solved? how to deal with it


import { State } from "./reducers";
import { MapDispatchToPropsParam, connect as ConnectRedux } from "react-redux";

export function connect<TDispatchProps = {}, TOwnProps = any>(
  mapStateToProps?: (state: State, ownProps?: TOwnProps) => any,
  mapDispatchToProps?: MapDispatchToPropsParam<TDispatchProps, TOwnProps>
): any {
  return ConnectRedux(mapStateToProps, mapDispatchToProps);
}
@connect(state => {
  const pathname = state.router.location.pathname;
  return {}
})
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37164-2adac.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37164-2adac.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?