SyntaxFix
Write A Post
Hire A Developer
Questions
You are passing hello() as a string, also hello() means execute hello immediately.
hello()
hello
try
onClick={hello}