convert to using react.js