update to new react api