{"id":16667250,"url":"https://github.com/peterpme/react-native-fast-text","last_synced_at":"2025-04-09T23:15:57.696Z","repository":{"id":197398929,"uuid":"698577915","full_name":"peterpme/react-native-fast-text","owner":"peterpme","description":"A drop-in replacement Text component for React Native that removes overhead ","archived":false,"fork":false,"pushed_at":"2024-03-16T10:13:51.000Z","size":1332,"stargazers_count":128,"open_issues_count":2,"forks_count":3,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-09T23:15:54.058Z","etag":null,"topics":["react-native"],"latest_commit_sha":null,"homepage":"https://github.com/peterpme/react-native-fast-text","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterpme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-30T10:32:04.000Z","updated_at":"2025-04-04T11:56:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"4c1e68df-87cf-4c76-8e2e-4c927ba56961","html_url":"https://github.com/peterpme/react-native-fast-text","commit_stats":null,"previous_names":["peterpme/react-native-fast-text"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterpme%2Freact-native-fast-text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterpme%2Freact-native-fast-text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterpme%2Freact-native-fast-text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterpme%2Freact-native-fast-text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterpme","download_url":"https://codeload.github.com/peterpme/react-native-fast-text/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125592,"owners_count":21051770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["react-native"],"created_at":"2024-10-12T11:13:38.151Z","updated_at":"2025-04-09T23:15:57.657Z","avatar_url":"https://github.com/peterpme.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-fast-text\n\nA faster version of the React Native Text component that removes (for the most part) unnecessary overhead.\n\n## Why?\n\nThe native Text implementation includes additional \\*onPress props:\n\n- onLongPress\n- onPress\n- onPressIn\n- onPressOut\n- disabled\n- pressReactOffset\n\nIt also includes a state variable called `isHighlighted`, which causes unnecessary renders. \nAdditionally, it wraps the Text with the `\u003cTextAncestor.Provider /\u003e` context provider, thereby polluting the React tree. \n\nBy removing this extra logic and going straight down into `RCTText` we have a much faster text component.\n\n### Notice\n\nIt's worth noting that removing the context provider has one downside: while nesting Text inside Text still works, each individual Text node must be styled independently since style inheritance is lost. The advantages outweigh the disadvantages though.\n\n## Installation\n\nInstall the module. Use it however you'd like.\n\nThere's a codmod in here that will convert _all_ of your `import { Text } from 'react-native` to use `import { Text } from 'react-native-fast-text`.\n\n```\nnpx jscodeshift -t node_modules/react-native-fast-text/codemods/transform-to-fast-text.js\n```\n\nThen when the time comes, you can also run a codemod to remove `react-native-fast-text`\n\n```\nnpx jscodeshift -t node_modules/react-native-fast-text/codemods/transform-from-fast-text.js\n```\n\n### Links\n\nRead this [Twitter thread by Nate](https://x.com/natebirdman/status/1695511232298783079?s=42)\n\nHere's the [Text implementation from React Native](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Text/Text.js)\n\n## Thanks\n\nAll I did was create the package. The brains behind this is Nate from Tamagui ([@natebirdman](https://x.com/natebirdman)). Tamagui is an incredible cross platform library.\n\n[@FernandoTheRojo](https://x.com/FernandoTheRojo) also had an awesome [thread](https://x.com/fernandotherojo/status/1707762822015267219?s=42) breaking down why this is happening.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterpme%2Freact-native-fast-text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterpme%2Freact-native-fast-text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterpme%2Freact-native-fast-text/lists"}