Closed katk0smos closed 6 years ago
@TheWaffleDimension
import { mount } from 'react-mounter'
import { withTracker } from 'meteor/react-meteor-data'
const Layout = ({ children }) => <div>{children()}</div>
const HomeTracker = props => {
return { title: 'Home' }
}
const HomeComponent = ({ title }) => <div>{title}</div>
const Home = withTracker(HomeTracker)(HomeComponent)
FlowRouter.route('/', {
action() {
mount(Layout, {
children: () => <Home />
})
}
})
Thanks @crapthings . Not sure why it wasn't working before, but copying and pasting your code in and modifying it to fit my application made it work.
I'm running into the same thing with Meteor 1.6.1.1 and FlowRouter 2.12.1:
W20180521-19:19:05.342(-5)? (STDERR) /Users/chip/.meteor/packages/meteor-tool/.1.6.1_1.1hnw4g8++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
W20180521-19:19:05.343(-5)? (STDERR) throw(ex);
W20180521-19:19:05.343(-5)? (STDERR) ^ W20180521-19:19:05.343(-5)? (STDERR)
W20180521-19:19:05.343(-5)? (STDERR) TypeError: Class extends value undefined is not a constructor or null W20180521-19:19:05.343(-5)? (STDERR) at ReactMeteorData.jsx (packages/react-meteor-data/ReactMeteorData.js
x:164:40) W20180521-19:19:05.344(-5)? (STDERR) at fileEvaluate (packages/modules-runtime.js:343:9)
W20180521-19:19:05.344(-5)? (STDERR) at require (packages/modules-runtime.js:238:16) [0/4793]
W20180521-19:19:05.344(-5)? (STDERR) at createContainer.jsx (packages/react-meteor-data/createContainer.js
x:1:210)
W20180521-19:19:50.829(-5)? (STDERR) at fileEvaluate (packages/modules-runtime.js:343:9)
W20180521-19:19:50.830(-5)? (STDERR) at require (packages/modules-runtime.js:238:16)
W20180521-19:19:50.830(-5)? (STDERR) at react-meteor-data.jsx (packages/react-meteor-data/react-meteor-dat
a.jsx:1:139)
W20180521-19:19:50.831(-5)? (STDERR) at fileEvaluate (packages/modules-runtime.js:343:9)
W20180521-19:19:50.831(-5)? (STDERR) at require (packages/modules-runtime.js:238:16)
W20180521-19:19:50.831(-5)? (STDERR) at /Users/chip/code/tracker-app/.meteor/local/build/programs/server/p
ackages/react-meteor-data.js:330:15
W20180521-19:19:50.831(-5)? (STDERR) at /Users/chip/code/tracker-app/.meteor/local/build/programs/server/p
ackages/react-meteor-data.js:337:3
W20180521-19:19:50.832(-5)? (STDERR) at infos.forEach.info (/Users/chip/code/tracker-app/.meteor/local/bui
ld/programs/server/boot.js:418:13)
W20180521-19:19:50.832(-5)? (STDERR) at Array.forEach (<anonymous>)
W20180521-19:19:50.832(-5)? (STDERR) at /Users/chip/code/tracker-app/.meteor/local/build/programs/server/b
oot.js:417:9
W20180521-19:19:50.833(-5)? (STDERR) at /Users/chip/code/tracker-app/.meteor/local/build/programs/server/b
oot.js:471:5
W20180521-19:19:50.833(-5)? (STDERR) at Function.run (/Users/chip/code/tracker-app/.meteor/local/build/pro
grams/server/profile.js:510:12)
W20180521-19:19:50.885(-5)? (STDERR) Waiting for the debugger to disconnect...
I also commented out all routes except for /
, which doesn't need withTracker
because it doesn't subscribe to any data, yet I still see this error. Should I abandon FlowRouter? Any other suggestions for fixing this? Thanks in advance.
I'm attempting to get this setup with Flow Router, and am running into this error: