【发布时间】:2017-08-22 18:06:30
【问题描述】:
为什么跳板函数中没有定义User?
springboard 在 React 路由路由中被称为 onEnter。
import User from '/imports/api/user.js';
const springboard = (nextState, replace, callback) => {
console.log(User.get());
}
来自用户的片段:
User = {
get: function() {
return Meteor.user() || {};
},
…
}
【问题讨论】:
标签: meteor reactjs react-router