Meteor.isServer and Meteor.isClient usage -
i'm trying understand how use isserver / isclient have .jsx file located in imports/ui/components/user/login.jsx
inside tried call meteor.isserver, meteor.isclient both values undefined. i'm newbie meteor , can't understand behavior.
import meteor 'meteor/meteor'; import react 'react'; import reactdom 'react-dom'; export class login extends react.component { onsubmit(){ //code omitted console.log(meteor.isclient); console.log(meteor.isserver); } render() { return ( <div classname="row"> //code omitted </div> ) }
}
i don't think meteor
default export, think need write import {meteor} 'meteor/meteor'
.
Comments
Post a Comment