Skip to content

docs: document the native will-change engine classes - #94

Open
jeltehomminga wants to merge 1 commit into
nativewind:mainfrom
jeltehomminga:jeltehomminga/will-change-engine-classes
Open

jeltehomminga wants to merge 1 commit into
nativewind:mainfrom
jeltehomminga:jeltehomminga/will-change-engine-classes

Conversation

@jeltehomminga

Copy link
Copy Markdown

On native, some className changes after the first render reset the component's state. The console then suggests a will-change-* class, but the will-change page only lists Tailwind's four web classes. This adds an RC notes section with the native ones.

I checked every class named on the page on an iOS 26.5 simulator and an Android 17 emulator (Debug, nativewind 5.0.0-rc.0, react-native-css 3.1.0-rc.0). Each View got its class one second after mounting, and a child counted its own mounts:

  • text-red-500, text-lg, font-bold, leading-6, shadow-md, scale-50, animate-pulse, transition-colors, @container and group reset without the matching class and keep their state with it.
  • duration-300 needs both will-change-animation and will-change-variable, but the console only names the variable one.
  • will-change-pressable didn't stop the reset for active:opacity-50 on a View. A Pressable, or a View with an active: class from the start, doesn't reset. react-native-css #469 looks like the fix.
  • A Pressable around a View with will-change-container doesn't get the tap. I checked that on Android only. react-native-css #482 looks like the fix.

Happy to drop the two "in this RC" paragraphs if you'd rather keep RC bugs out of the docs.

pnpm test:llm and pnpm build pass, and the page's Markdown export shows the section. I didn't check web.

Copilot AI balanced review requested due to automatic review settings October 25, 2026 12:41
@vercel

vercel Bot commented Oct 25, 2026

Copy link
Copy Markdown

@jeltehomminga is attempting to deploy a commit to the nativewind Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused documentation changes match the reported RC behavior, with no unresolved review findings.

No open issues 🎉

What changed in this PR

This documentation-only PR explains native will-change-* classes on the v5 will-change page, helping users avoid state resets when changing className after mounting.

Changes:

  • Documents native variable, animation, and container classes separately from Tailwind’s web-only classes.
  • Explains when multiple classes are needed and how to follow development warnings.
  • Describes RC-specific pressable limitations and workarounds.
File Description
content/​v5/​tailwind/​interactivity/​will-change.mdx Adds native engine guidance and RC caveats.

Review effort: Balanced

This branch has not been deployed

No deployments
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