是否可以使用Accounts.onEmailVerificationLink中的Redux存储的import os, sys
if 'PYTHONEXECUTABLE' in os.environ and :
sys.executable = os.environ['PYTHONEXECUTABLE']
?
我在Meteor应用程序中使用React和React-redux。
验证电子邮件后,我想通过this.props.dispatch
我正在努力使这项工作(如果可能的话):
this.props.dispatch
答案 0 :(得分:3)
您需要从定义的任何位置导入商店对象
import store from '../config/store'
然后您可以直接从商店对象中调度动作
store.dispatch(changemainmessage(error.reason));
此外,我建议为您的变量使用camelCase-它更具可读性,并且遵循JavaScript约定
因此changemainmessage()
将是changeMainMessage()