feat(toast): set empty object as default value for store props #2693
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #2692
📝 Description
Make
ToastStorePropsparameter optional by setting an empty object as default value in thecreateToastStorefunction. This improves developer experience by eliminating the need to pass an empty object when no configuration is required.⛳️ Current behavior (updates)
Currently, the
createToastStorefunction requires aToastStorePropsparameter to be passed, even when using default settings. Developers must explicitly pass an empty object when no custom configuration is needed.🚀 New behavior
The
createToastStorefunction now accepts an optionalToastStorePropsparameter with an empty object as the default value. Developers can call the function without any arguments when using default settings.💣 Is this a breaking change (Yes/No):
No.
📝 Additional Information
This change maintains full backward compatibility while improving the developer experience. All existing code will continue to work without modifications.
Before
After