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

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -