hi all,
This should be sooo simple, but no clue why it is not working (yes, I know I should better not use session. And yes I have installed the session package)
I have an event clicked, and this event calls a login function. This sets a session which my helper should read, but somehow the helper can’t see the value…
import { Session } from 'meteor/session';
function login(user) {
console.log('login ', user, Meteor.userId());
try {
Session.set('loadingIndicator', 'loading');
console.log('loading in login function is ', Session.get('loadingIndicator'));
Template.SSBIUsers.helpers({
loading() {
console.log('loading is ', Session.get('loadingIndicator'));
return Session.get('loadingIndicator');
}
})
the console.log output
loading in login function is loading
loading in helper is
Thank you so much for helping me with this dummy question! (I am deeply ashamed )