Skip to content

Make 'type' option optional in useMounted hook - #289

Merged
botond-szabo merged 1 commit into
mainfrom
botond-szabo-patch-1
Aug 29, 2026
Merged

Make 'type' option optional in useMounted hook#289
botond-szabo merged 1 commit into
mainfrom
botond-szabo-patch-1

Conversation

@botond-szabo

@botond-szabo botond-szabo commented Aug 29, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Bug Fixes
    • Simplified use of the mounted-state hook by making its options optional.
    • Added a default behavior that returns the function access type when no option is provided.

@changeset-bot

changeset-bot Bot commented Aug 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2247348

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@necto-github-bot

Copy link
Copy Markdown
Contributor
Fails
🚫

PR title doesn't follow conventional commits.

  • subject may not be empty
  • type may not be empty
  • scope may not be empty

Since NodeKit squash-merges, the PR title becomes the commit message.
Examples:

  • feat(hooks): add usePress
  • fix(popper): correct arrow offset on flip
  • chore(deps): bump vitest

Generated by 🚫 dangerJS against 2247348

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a3ff2325-1d32-49e9-90b3-6ca10b75e7a5

📥 Commits

Reviewing files that changed from the base of the PR and between 8656bd9 and 2247348.

📒 Files selected for processing (1)
  • packages/@necto-react/necto-react-hooks/src/useMounted/useMounted.ts

📝 Walkthrough

Walkthrough

The useMounted hook now accepts no options and defaults its type option to 'function'. The change removes the explicit type assertion from the options object.

Changes

useMounted API update

Layer / File(s) Summary
Optional type default
packages/@necto-react/necto-react-hooks/src/useMounted/useMounted.ts
useMounted now accepts an optional options object. The type option defaults to 'function' through destructuring.

Estimated code review effort: 1 (Trivial) | ~3 minutes

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch botond-szabo-patch-1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@botond-szabo
botond-szabo merged commit 0573f77 into main Aug 29, 2026
5 of 7 checks passed
@botond-szabo
botond-szabo deleted the botond-szabo-patch-1 branch August 29, 2026 01:05
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.

1 participant