-
Notifications
You must be signed in to change notification settings - Fork 70
Advisory: ory elements‐react upgrade guide to v1.0.0‐next.11
Jonas Hungershausen edited this page Oct 22, 2024
·
6 revisions
-
Renamed all
Headless*types and components toOry*equivalents to better align with naming conventions:-
HeadlessButtonProps➔OryNodeButtonProps -
HeadlessInputProps➔OryNodeInputProps -
HeadlessImageProps➔OryNodeImageProps -
HeadlessLabelProps➔OryNodeLabelProps -
HeadlessTextProps➔OryNodeTextProps -
HeadlessLinkButtonProps➔OryNodeAnchorProps -
HeadlessMessageProps➔OryMessageContentProps -
HeadlessMessagesProps➔OryMessageRootProps -
HeadlessFormProps➔OryFormRootProps -
HeadlessGroupProps➔OryFormGroupsProps -
HeadlessGroupContainerProps➔OryFormGroupProps -
HeadlessCurrentIdentifierProps➔OryCurrentIdentifierProps -
HorizontalDividerProps➔OryCardDividerProps -
HeadlessAuthMethodListItemProps➔OryCardAuthMethodListItemProps -
HeadlessSocialButtonProps➔OryNodeOidcButtonProps -
HeadlessSocialButtonContainerProps➔OryFormOidcRootProps -
HeadlessSocialButtonsProps➔OryFormOidcButtonsProps
-
-
Removed the following functions and types:
- Functions:
onSubmitLoginonSubmitRegistrationonSubmitRecoveryonSubmitSettingsonSubmitVerificationformatMessageformElementIdformLabelIdisCustomTranslations
- Types:
FlowContainerIntlProviderIntlProviderPropsCustomLanguageFormatsCustomTranslationsLanguageCodesTranslationFileProviderPropsOryComponentProviderOryFlowProviderOryFlowProviderPropsOryFormComponentsOryCardComponents
- Functions:
-
Modified types and components:
-
OryFlowComponentsstructure has been updated to accommodate the new naming conventions and component hierarchy. -
FlowContainerSetterandFlowContextValuenow expectOryFlowContainerinstead ofFlowContainer. - Removed the need of providing your own IntlProvider, simplifying custom translation management.
-
To upgrade to this version, please make the following changes in your codebase:
-
Update Type and Component Names:
- Replace all
Headless*prefixes withOry*in your imports and code. - Update component and type names according to the renaming list provided above.
- Replace all
-
Adjust Function Usage:
- Remove any usage of the deprecated
onSubmit*functions (onSubmitLogin,onSubmitRegistration, etc.). Implement your own submission handlers as needed.
- Remove any usage of the deprecated
-
Internationalization Updates:
- Instead of wrapping Ory Components with an
IntlProvider, please provide your custom translations and i18n settings via the newintlobject in theOryClientConfigurationpassed to each flow component.
- Instead of wrapping Ory Components with an
-
Component Provider Changes:
- Remove
OryComponentProvider,OryFlowProvider, andOryFlowProviderPropsfrom your code. Their functionalities are now integrated into other components or no longer necessary.
- Remove
-
Type Adjustments:
- Replace any usage of
FlowContainerwith the specific flow container types likeLoginFlowContainer,RegistrationFlowContainer, etc. - Update any references to removed types such as
CustomLanguageFormats,CustomTranslations,LanguageCodes, andTranslationFile.
- Replace any usage of
-
Review Component Structures:
- Check the updated
OryFlowComponentsto understand the new component hierarchy and adjust your custom components if you have any overrides or extensions.
- Check the updated
By addressing these changes, your application should be compatible with the latest version of @ory/elements-react.