Repository navigation
docs: document the native will-change engine classes - #94
Open
jeltehomminga wants to merge 1 commit into
Open
jeltehomminga wants to merge 1 commit into
jeltehomminga wants to merge 1 commit into
Conversation
|
@jeltehomminga is attempting to deploy a commit to the nativewind Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
🟢 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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,@containerandgroupreset without the matching class and keep their state with it.duration-300needs bothwill-change-animationandwill-change-variable, but the console only names the variable one.will-change-pressabledidn't stop the reset foractive:opacity-50on a View. APressable, or a View with anactive:class from the start, doesn't reset. react-native-css #469 looks like the fix.Pressablearound a View withwill-change-containerdoesn'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:llmandpnpm buildpass, and the page's Markdown export shows the section. I didn't check web.