V2 has been our most stable library release ever. It's been around for nearly 2 years. V3 will set up an even more stable future. It is our most standalone and future facing library ever.
Most of the examples have been migrated for a while with these latest breaking changes to ease the transistion. So if you've copied examples over recently those should be good to go for the most part.
NOTE: Before starting the migration you will want to download the latest of V2. This version has marked elements for deprecation with some helpful warnings to ease the upgrade.
We had support for React 19 since day one of it's release. However, primarily due to how React 19 simplifies ref forwarding, React 19 is now required. This dramatically simplifies our library, and makes our components up to 2x faster.
In this version we severed the icons package from the library, making it completely optional. This allows you to bring your own icons, or in some senarios, no icons at all. This aligns React with our other libraries' icons packaging stragey.
AccordionToggleIcon now requires elementClosed, elementOpen properties.
Before:
<AccordionToggleIcon />After:
import { VisaChevronDownTiny, VisaChevronRightTiny } from '@visa/nova-icons-react';
...
<AccordionToggleIcon
elementClosed={<VisaChevronRightTiny rtl />}
elementOpen={<VisaChevronDownTiny />}
/>The tag property is also no longer supported.
We migrated BannerIcon, DialogIcon, FlagIcon, MessageIcon, SectionMessageIcon from the React library to the consolidated MessageIcon component in the React icons library.
Before:
import { BannerIcon, DialogIcon, FlagIcon, MessageIcon, SectionMessageIcon } from '@visa/nova-react';After:
import { MessageIcon } from '@visa/nova-icons-react';The messageType property is no longer passed automatically to the MessageIcon. So be sure to pass it to the icon.
-
BannerIconBefore:
<Banner messageType="warning"> <BannerIcon /> </Banner>
After:
<Banner messageType="warning"> <MessageIcon messageType="warning" /> </Banner>
-
DialogIconBefore:
<Dialog messageType="warning"> <DialogIcon /> </Dialog>
After:
<Dialog messageType="warning"> <MessageIcon messageType="warning" /> </Dialog>
-
FlagIconBefore:
<Flag messageType="warning"> <FlagIcon /> </Flag>
After:
<Flag messageType="warning"> <MessageIcon messageType="warning" /> </Flag>
-
SectionMessageIconBefore:
<SectionMessage messageType="warning"> <SectionMessageIcon /> </SectionMessage>
After:
<SectionMessage messageType="warning"> <MessageIcon messageType="warning" /> </SectionMessage>
Child(ren) are now required for BannerCloseButton, DialogCloseButton, FlagCloseButton, MessageCloseButton, SectionMessageCloseButton. The <VisaCloseTiny /> component from the icons library is no longer the default child.
-
BannerCloseButtonBefore:
<BannerCloseButton />
After:
<BannerCloseButton> <VisaCloseTiny /> </BannerCloseButton>
-
DialogCloseButtonBefore:
<DialogCloseButton />
After:
<DialogCloseButton> <VisaCloseTiny /> </DialogCloseButton>
-
FlagCloseButtonBefore:
<FlagCloseButton />
After:
<FlagCloseButton> <VisaCloseTiny /> </FlagCloseButton>
-
SectionMessageCloseButtonBefore:
<SectionMessageCloseButton />
After:
<SectionMessageCloseButton> <VisaCloseTiny /> </SectionMessageCloseButton>
The ariaLabel property has been changed to aria-label to keep it consistent with the dom property's spelling.
These were used to pass the messageType to the MessageIcon component. Obviously, since the MessageIcon has been migrated these are no longer being used, thus were removed.
Migrate to ProgressCircular, ProgressLinear
Migrate to Badge with badgeVariant="number" property
Migrate varients 'color-default' | 'color-subtle' to colorScheme
Before:
<Button<AchorElement> />After:
<Button<'a'> />Here is a helpful regex to find all element type castings in your codebase:
^\s*<[^>|^ ]*<
The ariaLabel property has been changed to aria-label to keep it consistent with the dom property's spelling.