Skip to content
This repository was archived by the owner on Oct 20, 2021. It is now read-only.
This repository was archived by the owner on Oct 20, 2021. It is now read-only.

React tutorial step 8: currentUser needs to be exported #148

@t3db0t

Description

@t3db0t

As it stands, currentUser is not defined/exported, and so the New Task input field never shows up. I think currentUser is supposed to be provided by Blaze, but I'm not sure exactly how that's supposed to work with the Blaze wrapper.

In any case, I got it to work as desired by adding currentUser to the withTracker export (see bug #147)

export default withTracker(props => {
	return {
		tasks: Tasks.find({}, { sort: { createdAt: -1 } }).fetch(),
		incompleteCount: Tasks.find({ checked: { $ne: true } }).count(),
		currentUser: Meteor.user(),
	};
})(App);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions