Iam new in meteor + react.
I use ostrio:flow-router-extra
in imports/ui/App.tsx
import React from 'react'
interface Props {
content?: JSX.Element;
}
const App = ({ content }: Props) => {
return content
}
export default App
in client/routes.tsx
import React from 'react'
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
import { mount } from 'react-mounter'
import App from '../imports/ui/App'
import HomePage from '../imports/ui/Home'
import AboutPage from '../imports/ui/About'
FlowRouter.route('/', {
name: 'Home',
action(){
mount( App, {
content: <HomePage />
})
}
})
FlowRouter.route('/about', {
name: 'About',
action(){
mount( App, {
content: <AboutPage />
})
}
})
and last client/main.tsx
import React from 'react';
import { Meteor } from 'meteor/meteor';
import { render } from 'react-dom';
import App from '/imports/ui/App'
Meteor.startup(() => {
render(<App />, document.getElementById('root'));
});
I Just follow this tutorial
meteor react flow router
and I dont know where I wrong?
how to solve this? so I can run flow router? or should I change to react router?
additional, ostrio:flow-router-extra still error in typescript lint.