Skip to content

[all components] Allow actionsRef to be null - #3682

Merged
mj12albert merged 4 commits into
mui:masterfrom
mj12albert:actions-ref-null
Jan 13, 2026
Merged

mj12albert merged 4 commits into
mui:masterfrom
mj12albert:actions-ref-null

Conversation

@mj12albert

@mj12albert mj12albert commented Jan 5, 2026 •

Copy link
Copy Markdown
Member

Allows initializing actionsRef with null instead of a noop (#3395 (comment))

@pkg-pr-new

pkg-pr-new Bot commented Jan 5, 2026 •

Copy link
Copy Markdown
  • vite-css-base-ui-example

    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/react@3682
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@3682
    

commit: 53f01ae

@netlify

netlify Bot commented Jan 5, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 53f01ae
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6965e5527d623b0008c75ef7
😎 Deploy Preview https://deploy-preview-3682--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mui-bot

mui-bot commented Jan 5, 2026 •

Copy link
Copy Markdown

Bundle size report

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@mj12albert mj12albert added the scope: all components Widespread work has an impact on almost all components. label Jan 5, 2026
@mj12albert
mj12albert marked this pull request as ready for review January 5, 2026 08:57
@michaldudak

Copy link
Copy Markdown
Member

What's the benefit here? If they don't use actionsRef, they can simply leave it undefined, no?

@atomiks

atomiks commented Jan 12, 2026 •

Copy link
Copy Markdown
Contributor

@michaldudak this is about the ref type: it doesn't accept null in the ref type itself (useRef(null)) currently so you need to match the shape of Component.Root.Actions which is cumbersome/needless with the ease of optional chaining ?.

@mj12albert mj12albert changed the title Allow actionsRef to be null [all components] Allow actionsRef to be null Jan 13, 2026
@mj12albert
mj12albert merged commit effa40b into mui:master Jan 13, 2026
@mj12albert
mj12albert deleted the actions-ref-null branch January 13, 2026 06:44
atomiks pushed a commit to atomiks/base-ui that referenced this pull request Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: all components Widespread work has an impact on almost all components. typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants