fix: use React Native Text element in RelativeTime example#319
Closed
moss-bryophyta wants to merge 1 commit into
Closed
fix: use React Native Text element in RelativeTime example#319moss-bryophyta wants to merge 1 commit into
moss-bryophyta wants to merge 1 commit into
Conversation
…example React Native has no <p> element. The RelativeTime API reference for gt-react-native used an HTML <p> tag in the explicit value/unit example, which would not work in a React Native app. Replace it with <Text> from react-native.
moss-bryophyta
enabled auto-merge (squash)
June 17, 2026 15:05
Contributor
Author
auto-merge was automatically disabled
July 17, 2026 18:09
Pull request was closed
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.
Summary
The
RelativeTimeAPI reference page forgt-react-nativeused an HTML<p>tag in the "Explicit value and unit" example. React Native has no<p>element — text must be wrapped in<Text>fromreact-native.This fix replaces the
<p>wrapper with<Text>and adds the corresponding import so the example actually runs in a React Native app.Changes
docs/en-US/react-native/api/components/relativetime.mdx:<p>→<Text>, addedimport { Text } from 'react-native'Found during the daily docs review. 🌿