Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposed notification API 'add' and 'remove' methods as non-hook function variants. #63

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

lmatejic-CROZ
Copy link
Collaborator

@lmatejic-CROZ lmatejic-CROZ commented Apr 18, 2024

Basic information

  • nrich-frontend version: 3.0.1
  • Module: notification

Additional information

Resolving #62

Description

Summary

Re-exported methods to satisfy naming conventions of React hooks and enable them to be used as non-hook variants.

Details

Separated the store creation into a variable and exported as the currently used useNotificationsStore hook to keep compatibility. Added 2 more exports to enable the methods being available as standard (non-hook) functions.

Related issue

#62

Types of changes

  • Enhancement (non-breaking change which enhances existing functionality)

Checklist

  • I have read the project's CONTRIBUTING document
  • I have checked my code with the project's static analysis tooling
  • I have formatted my code with the project's IDEA code-style configuration
  • I have checked my code for misspellings
  • I have organized my changes in easy-to-follow commits
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes -> the logic is unchanged, changes are semantic by nature
  • All new and existing tests pass.

Copy link

changeset-bot bot commented Apr 18, 2024

🦋 Changeset detected

Latest commit: 3e3ba59

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@croz/nrich-notification-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.02%. Comparing base (6ce2e3b) to head (3e3ba59).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #63      +/-   ##
==========================================
+ Coverage   99.01%   99.02%   +0.01%     
==========================================
  Files          25       25              
  Lines         203      206       +3     
  Branches       32       32              
==========================================
+ Hits          201      204       +3     
  Misses          2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lmatejic-CROZ lmatejic-CROZ changed the title #62 Exposed notification API 'add' and 'remove' methods as non-hook function variants. Exposed notification API 'add' and 'remove' methods as non-hook function variants. Apr 18, 2024
@jtomic-croz jtomic-croz merged commit 31781d3 into master Apr 18, 2024
1 check passed
@jtomic-croz jtomic-croz deleted the feature_exposeNotificationMethods branch April 18, 2024 11:13
@github-actions github-actions bot mentioned this pull request Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants