Meteor.startup'ı bir Yönlendirici Tepki bileşeniyle (farklı bir .jsx'de yaşıyor) uygulamaya çalışıyorum, ancak işe yaramıyor gibi görünüyor.Harici tepki yolları olan Meteor.startup bileşeni
Yönlendirici Yanıtı bileşenini Meteor.startup ile aynı .jsx dosyasında varsa, o zaman iyi çalışıyor.
Bunun neden olabileceği hakkında bir fikrin var mı?
import { Routes } from './routes.jsx';
Meteor.startup(() => {
render(<Routes />, document.body);
});
o routes.jsx aşağıda kod parçacığı gösterilen aynı Rota içerir unutmayın:
İşte çalışmıyor benim kodudur. Burada
Ve
çalışır kod şudur:export default class Routes extends Component{
render() {
return (
<Router history={browserHistory}>
<Route path="/" component={App}>
</Route>
</Router>
);
}
}
Meteor.startup(() => {
render(<Routes />, document.body);
});