Updating component to work with latest React.