react-router4, bundler-loader and typescript problem #58
Comments
@DebugIsFalse please provide minimum reproducible test repo, it is difficult to search problem in code inside in |
when i use webpack3 + react-router4 + es6 +bundle-loader to do 'Load on demand', this is no problem; but is change to the typescript cannot to do and the code is more ,i cannot show the code; |
Hi @DebugIsFalse. It turns out that in version 4.2.2 of react-router they will be recommending to go to
|
@DebugIsFalse Did you solve this? I also have this problem and dont know how to clear tsc compile error update: Solved by add bundle-loader into webpack.config.json and set options.lazy with |
I also have this problem and it works with |
when i use typescript
i set webpack module loaders
{ test : /\.tsx?$/, include: path.resolve(__dirname, './src/router/'), loaders : ['bundle-loader?lazy', 'babel-loader','ts-loader'] }
and it will show me the error 'props.load is not a function';
App.tsx
`import 'babel-polyfill';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import {
HashRouter,
Route
} from 'react-router-dom';
import Bundle from './bundle';
import HomeIndex from './router/homes/home';
const Home = () => (
{
(Home : any) =>
}
);
ReactDOM.render(
welcome to react
,document.getElementById('root')
);
`
Bundle.tsx
`import * as React from 'react';
export default class Bundle extends React.Component< any,any > {
constructor( props?:any ) {
super(props);
this.state = {
mod : null
}
}
}`
The text was updated successfully, but these errors were encountered: