Skip to content

Conversation

@dmytrokirpa
Copy link
Contributor

@dmytrokirpa dmytrokirpa commented Jan 7, 2026

What’s in this PR

This PR adds the RFC “Component Behavior State Hooks” as a separate proposal.

It is extracted from the broader “RFC: Unstyled Components” work in #35464, so reviewers can discuss the behavior-state-hooks proposal independently of the other changes in that PR.

The original PR also contains additional context and illustrative examples (including related patterns explored alongside unstyled components). If you want to see the broader exploration and code samples, refer to the linked PR.

What’s not in this PR

No implementation changes; this is documentation/RFC only.

@dmytrokirpa dmytrokirpa self-assigned this Jan 7, 2026
@github-actions github-actions bot added the Type: RFC Request for Feedback label Jan 7, 2026
@dmytrokirpa dmytrokirpa force-pushed the rfc/behavior-state-hooks branch from 227bbb8 to 948a0d2 Compare January 7, 2026 11:05
@dmytrokirpa dmytrokirpa marked this pull request as ready for review January 7, 2026 11:08
@dmytrokirpa dmytrokirpa requested review from a team as code owners January 7, 2026 11:08
@github-actions
Copy link

github-actions bot commented Jan 7, 2026

📊 Bundle size report

✅ No changes found

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Pull request demo site: URL

@dmytrokirpa dmytrokirpa force-pushed the rfc/behavior-state-hooks branch from 26542d6 to 82bd448 Compare January 7, 2026 14:30
@layershifter
Copy link
Member

@dmytrokirpa in offline we discussed risks of shipping new hooks in the stable packages.

  • Let's add a section to the RFC about our promises on breaking changes for these hooks.
  • Let's clarify exports (export from the suite or no) & naming parts.

I don't have strong opinions on this (except that we shouldn't re-export them from the suite package from day 1), so feel free to propose options based on the discussion yesterday.

@dmytrokirpa
Copy link
Contributor Author

@dmytrokirpa in offline we discussed risks of shipping new hooks in the stable packages.

  • Let's add a section to the RFC about our promises on breaking changes for these hooks.
  • Let's clarify exports (export from the suite or no) & naming parts.

I don't have strong opinions on this (except that we shouldn't re-export them from the suite package from day 1), so feel free to propose options based on the discussion yesterday.

@layershifter Updated the behavior-state-hooks RFC with several key changes:

1. Naming Convention Change:

  • Renamed from use${ComponentName}Base_unstableuse${ComponentName}Behavior_unstable
  • Updated type names: ButtonBaseProps/StateButtonBehaviorProps/State
  • Rationale: "Behavior" more clearly describes what these hooks provide (behavior without styling)
  • Updated throughout all code examples, diagrams, and references

2. Exports and Naming Section (new):

  • Behavior state hooks exported from individual component packages (e.g., @fluentui/react-button)
  • NOT re-exported from suite package (@fluentui/react-components) initially
  • Establishes clear naming pattern for hooks, props, and state types
  • May consider suite re-export in future based on adoption

3. Release Strategy Section (new):

  • Feature branch development: Iterate without blocking main branch
  • Experimental releases: Individual component packages with experimental tags (e.g., @fluentui/react-button@experimental)
  • Partner validation: Gather feedback before stabilizing
  • Benefits: Early access, API refinement, stable releases unaffected, incremental rollout
  • Stability guarantees: Once stable, follows standard _unstable API guarantees (implementation details may change in minor versions, public API follows semver)

Commit: 52a0480

@dmytrokirpa dmytrokirpa requested a review from Hotell January 11, 2026 11:26
@dmytrokirpa dmytrokirpa changed the title docs: behavior state hooks RFC docs: base state hooks RFC Jan 11, 2026
Copy link
Contributor

@Hotell Hotell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants