gpt4 book ai didi

meteor - 在 Meteor 中,您如何检测新用户何时登录?

转载 作者:行者123 更新时间:2023-12-04 06:42:16 24 4
gpt4 key购买 nike

文档:

http://docs.meteor.com/#publish_userId



This is constant. However, if the logged-in user changes, the publish function is rerun with the new value.



是否有某种方法可以运行某些事件驱动的代码,该代码仅在登录用户更改的事件上触发?

最佳答案

Meteor.user() , Meteor.userId()Meteor.userLoaded()都是响应式(Reactive)数据源( documentation )。

如果您将它们放在模板助手中或围绕它们构建您自己的上下文,您会注意到当前用户何时更改。

关于meteor - 在 Meteor 中,您如何检测新用户何时登录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13114390/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com