Answer the question
In order to leave comments, you need to log in
Meteor-React-FlowRouter not dumping data from db on page reload?
Good day, there is such a route
renderMainLayoutWith = (component, pageTitle) ->
DocHead.setTitle if pageTitle? then pageTitle else '404 - Page not found :('
ReactLayout.render MainLayout,
header: `<Header />`
content: component
footer: `<Footer />`
FlowRouter.route '/',
name: 'Home'
action: ->
renderMainLayoutWith `<Home />`, @name
FlowRouter.route '/:url',
name: 'MultiRouter'
triggersEnter: [ ->
url = FlowRouter.current().path
try
@renderName = Routing.findOne({link: url}).name
catch TypeError
@renderName = '404 - Page not found :('
]
action: ->
switch renderName
when "Home" then renderMainLayoutWith `<Home />`, renderName
when "About Me" then renderMainLayoutWith `<AboutMe />`, renderName
when "Notebook" then renderMainLayoutWith `<Notebook />`, renderName
when "Portfolio" then renderMainLayoutWith `<Portfolio />`, renderName
when "Contacts" then renderMainLayoutWith `<Contacts />`, renderName
else
renderMainLayoutWith `<PageNotFound />`, renderName
FlowRouter.notFound =
action: ->
renderMainLayoutWith `<PageNotFound />`
Answer the question
In order to leave comments, you need to log in
I would use ReactRouter if I were you.
Most likely, it does not have time to receive the data here
Try to check the Meteor.loggingIn() log through the console, according to my experience, when updating the page, Meteor.loggingIn() returns true and here you can already hang the loader as an option.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question