1

I have console.log() at some places in my code but none of the console.logs() in my react code is working. I am pasting some of them for your reference.Login.jsx http://pastebin.com/GnK5GYui and Main.jsx here http://pastebin.com/nLBgTQwC. If you want i can post other parts of the project.

0

3 Answers 3

5

use console.log() outside return statement. use in this way.

 render() {
   console.log('In Render')
   return (
  <div> In Render </div>
   )
}
Sign up to request clarification or add additional context in comments.

Comments

3

Its not console.logs(),its console.log().

render(){
console.log('In Render')
  return ()
}

1 Comment

Sorry for the typo I'm using console.log()
0

Remove the comma on line 32 in http://pastebin.com/GnK5GYui

console.log('In Render'),

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.