Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sashankaryal
Copy link
Contributor

@sashankaryal sashankaryal commented Nov 8, 2025

Add support for payload-less events, refactors hooks to a factory pattern for improved type safety, and docs

Changelog

  1. Events can have undefined payloads; dispatch makes payload optional.
  2. Replaces useEventHandler<T, E>() with createUseEventHandler<T>()() to avoid repeating the event group type.
  3. Switched handler storage from object/array to Map/Set.
  4. Re: off method, user can now remove specific handler or all handlers for an event
  5. Docs

Breaking Changes

  • useEventHandler replaced with createUseEventHandler factory pattern

@sashankaryal sashankaryal self-assigned this Nov 8, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 8, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (4)
  • develop
  • main
  • release/.*
  • feat/.*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch exp/events-poc-sash

Comment @coderabbitai help to get the list of available commands and usage tips.

@sashankaryal sashankaryal marked this pull request as ready for review November 8, 2025 22:07
@sashankaryal sashankaryal requested a review from a team as a code owner November 8, 2025 22:07
@sashankaryal sashankaryal changed the title more events work docs + more type safety for universal event bus Nov 8, 2025
@sashankaryal sashankaryal requested a review from tom-vx51 November 8, 2025 22:38
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.

2 participants