4 ms·
You don’t even need that syntax. (Please don’t use decorators in examples, they are not part of the language yet. This is super confusing.) function Foo(pr
by danabramov 10y ago
You don’t even need that syntax. (Please don’t use decorators in examples, they are not part of the language yet. This is super confusing.)
function Foo(props) {
return <span>Hello {props.data.currentUser.username}!</span>;
}
function getMeteorData() {
return {
currentUser: Meteor.user()
};
}
export default createContainer(getMeteorData)(Foo)
Why do you see this as “lunacy” compared to mixins?