流星帐户内部的Redux调度。onEmailVerificationLink

时间:2018-11-07 13:04:51

标签: reactjs meteor redux react-redux

是否可以使用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

1 个答案:

答案 0 :(得分:3)

您需要从定义的任何位置导入商店对象

import store from '../config/store'

然后您可以直接从商店对象中调度动作

store.dispatch(changemainmessage(error.reason));

Read more here

此外,我建议为您的变量使用camelCase-它更具可读性,并且遵循JavaScript约定

因此changemainmessage()将是changeMainMessage()