react class snippet