I’m not quite sure because I’m new to react and meteor. Here’s a link to my project’s GitHub Repo. It would be great if you could kindly have a look. I’m using an application architecture for Meteor called Mantra.
This way it’s passed down to all other components that need it. Admittedly you’re not supposed to abuse context in React, but I think that’s a fair use case.
facing the same problem of making const component reactive-
I am trying to make layout reactive which dynamically loads other components. Below is a layout code -
Problem Statement :- If user is logged in render content otherwise show login page i.e render login component re-actively.
If user is logged in it shows the content. And I fires a command Meteor.logout() at console, user logs out.But it does not reflects in browzer. But if I fires command Meteor.userId(), it gives null i.e user is logged out. To see the change I need to refresh the page then and then only login component renders as MainLayouts is not reactive.