fix some bugs and make ChatApp subclass object

react() always needs a second argument.

and make ChatApp subclass object for modernity.