Package detail

@react-native/assets

facebook1.3mMIT1.0.0

Asset support code for React Native.

readme

React Native

Learn once, write anywhere:
Build mobile apps with React.

React Native is released under the MIT license. Current npm package version. PRs welcome! Follow @reactnative

Getting Started · Learn the Basics · Showcase · Contribute · Community · Support

React Native brings React's declarative UI framework to iOS and Android. With React Native, you use native UI controls and have full access to the native platform.

  • Declarative. React makes it painless to create interactive UIs. Declarative views make your code more predictable and easier to debug.
  • Component-Based. Build encapsulated components that manage their state, then compose them to make complex UIs.
  • Developer Velocity. See local changes in seconds. Changes to JavaScript code can be live reloaded without rebuilding the native app.
  • Portability. Reuse code across iOS, Android, and other platforms.

React Native is developed and supported by many companies and individual core contributors. Find out more in our ecosystem overview.

Contents

📋 Requirements

React Native apps may target iOS 15.1 and Android 7.0 (API 24) or newer. You may use Windows, macOS, or Linux as your development operating system, though building and running iOS apps is limited to macOS. Tools like Expo can be used to work around this.

🎉 Building your first React Native app

Follow the Getting Started guide. The recommended way to install React Native depends on your project. Here you can find short guides for the most common scenarios:

📖 Documentation

The full documentation for React Native can be found on our website.

The React Native documentation discusses components, APIs, and topics that are specific to React Native. For further documentation on the React API that is shared between React Native and React DOM, refer to the React documentation.

The source for the React Native documentation and website is hosted on a separate repository, @facebook/react-native-website.

🚀 Upgrading

Upgrading to new versions of React Native may give you access to more APIs, views, developer tools, and other goodies. See the Upgrading Guide for instructions.

React Native releases are discussed in this discussion repo.

👏 How to Contribute

The main purpose of this repository is to continue evolving React Native core. We want to make contributing to this project as easy and transparent as possible, and we are grateful to the community for contributing bug fixes and improvements. Read below to learn how you can take part in improving React Native.

Code of Conduct

Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.

Contributing Guide

Read our Contributing Guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to React Native.

Open Source Roadmap

You can learn more about our vision for React Native in the Roadmap.

Good First Issues

We have a list of good first issues that contain bugs which have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with our contribution process.

Discussions

Larger discussions and proposals are discussed in @react-native-community/discussions-and-proposals.

📄 License

React Native is MIT licensed, as found in the LICENSE file.

changelog

Changelog

v0.80.0

Breaking

  • APIs: Subpath imports to the internal react-native/virtualized-lists package are not allowed. (be8393c41b by @iwoplaza)
  • APIs: The react-native package now defines package.json "exports". (319ba0afd2 by @huntie)
  • C++: Dispatch folly::dynamic events with r-value instead of l-value (12e5df844b by @rozele)
  • C++: Introduce beforeload callback arg into ReactInstance::loadScript (061174c150 by @RSNara)
  • deps: Updated eslint-config-react-native to depend on eslint-plugin-react-hooks v5.2.0 from v4.6.0. This includes a breaking change in which ESLint will no longer recognize component names that start with 1 or more underscores followed by a capital letter. (https://github.com/facebook/react/pull/25162) (4de592756b by @yungsters)
  • NewAppScreen: The NewAppScreen component is redesigned and moved to the react-native/new-app-screen package (3cf0102007 by @huntie)

Android specific

  • APIs: Deleting ChoreographerCompat, Use Choreographer.FrameCallback instead (f8b2956437 by @mdvacca)
  • APIs: Deleting deprecated StandardCharsets (40b38d0a44 by @mdvacca)
  • APIs:: Make DeviceInfoModule internal (f02607badb by @mateoguzmana)
  • APIs:: Make ModuleDataCleaner internal (6fa1864d52 by @mateoguzmana)
  • DevX: Removed loadSplitBundleFromServer from DevSupportManager interface (86cd31eb6b by @javache)
  • Kotlin: Convert ColorPropConverter to Kotlin (57768bfbcd by @fabriziocucci)
  • Kotlin: Convert DevSupportManagerBase to Kotlin. If you're subclassing this class, you will have to adjust some of the parameters as types have changed during the migration. (9da485b54c by @cortinico)
  • Kotlin: Convert NetworkModule to Kotlin, mark methods as final (8726e26348 by @Abbondanzo)
  • Kotlin: Convert ReactEditText to Kotlin. If you're subclassing this type you'll need to adjust your signatures. (cac27d15be by @cortinico)
  • Kotlin: Convert ReactInstanceDevHelper to Kotlin. Some users implementing this class in Kotlin could have breakages. As this is a devtools/frameworks API we're not marking this as breaking. (09492075e8 by @cortinico)
  • Kotlin: Convert ReactTextInputManager to Kotlin (ab47834eb1 by @cortinico)

iOS specific

Added

Android specific

  • Accessibility: Expose Android's screenReaderFocusable prop (4ce093154d by @jorge-cab)
  • Animated: Create UIManagerNativeAnimatedDelegate to potentially drive per frame NativeAnimated update (8d6098a645 by @zeyap)
  • APIs: Collections DSL functions for Kotlin(buildReadableMap, buildReadableArray) (78dbbaafdd by @l2hyunwoo)
  • C++: Allow invoking synchronouslyUpdateViewOnUIThread from c++ via UIManager (4912958812 by @zeyap)
  • infra: Generate keep.xml to prevent resource shrinking (864833fca9 by @jakex7)
  • NewArch: Add a legacyWarningsEnabled property to enable Legacy Warnings on NewArch (7ca2811750 by @cortinico)
  • NewArch: Warn Legacy Arch users if they use a Component with a ShadowNode with YogaMeasureFunction.measure() function. That Component will stop working on NewArch. (9345c88a61 by @cortinico)
  • StyleSheet: Adds android changes for radial gradient (a2409941c2 by @intergalacticspacehighway)
  • TextInput: Add new prop for filtering drag and drop targeting to text inputs (d10dd7130c by @Abbondanzo)

iOS specific

Changed

  • Animated: Animated components' ref will now only reattach when receiving new props if the new props contain different AnimatedValue or AnimatedEvent instances. (Previously, Animated components' ref would always reattach when receiving new props.) (eeab47e61a by @yungsters)
  • Animated: When an Animated component is unmounted, any completion callbacks will now be called in a microtask instead of during the commit phase. (da1bf8d1d1 by @yungsters)
  • APIs: InteractionManager is deprecated and will be removed in a future release. Its behavior has been changed to be the same as setImmediate, and callers should migrate away from it. (a8a4ab10d0 by @yungsters)
  • Codegen: Changed react-native-codegen to support types under CodegenTypes namespace (5349b7c7b5 by @j-piasecki)
  • deps: Bump minimum Metro from 0.81.0 to ^0.81.3 || ^0.82.0 (6606a1da84 by @robhogan)
  • deps: Bump React to 19.1 (0e11e6a28b by @cipolleschi)
  • deps: Replace hsr_core dependency for react profiling with hz_tracing dependency (0f55ef7754 by @metaadrianstone)
  • deps: Update debugger-frontend from bc635fa...343405b (647af1c4ca by @huntie)
  • deps: Update Metro to ^0.82.0 (0ad192003e by @robhogan)
  • Flow: Changed Flow for the React Native monorepo, so that React no longer has to be in scope when using JSX. (1bb7446993 by @yungsters)
  • Hermes: Configured Hermes Parser for Metro to target React 19, resulting in Component Syntax no longer producing forwardRef calls. (f2518d4374 by @yungsters)
  • Hermes: Configured Hermes Parser for ReactNative to target React 19, resulting in Component Syntax no longer producing forwardRef calls. (68cad5d2d3 by @yungsters)
  • JS: eslint-config-react-native now respects rules disabled by eslint-config-prettier. (6346689c3d by @yungsters)
  • JS: Replaced let with const where applicable for better code standards and micro-optimization. (38fefb2771 by @sanjaiyan-dev)
  • TypeScript: Re-expose src/* subpaths when not using the Strict TypeScript API (1a46b203b8 by @huntie)
  • TypeScript: Replace deprecated React.ElementRef usages to React.ComponentRef (12147e3bee by @mateoguzmana)

Android specific

iOS specific

  • CocoaPods: Enable DEFINES_MODULE in React-jsc.podspec (473e42bbc3 by @krozniata)
  • Image: Update RCTImageLoader.mm to cast loadHandler to RCTImageLoaderLoggable before calling shouldEnablePerfLogging (2562440385 by Aaron Coplan)
  • ScrollView: Overwrite betterHitTest in RCTScrollViewComponentView instead of changing layout metrics of the container view (850760ab61 by @j-piasecki)
  • Text: Replace a workaround for measuring multiline text with maximumNumberOfLines on iOS with a proper solution (77cdaa8733 by @j-piasecki)

Deprecated

  • Events: Deprecate *EventData types on Image, Switch, TextInput components. These can be substituted for *Event, e.g. NativeSyntheticEvent<ImageLoadEventData> becomes ImageLoadEvent. (701859b397 by @huntie)

Android specific

  • APIs: Correctly deprecate ReactContextBaseJavaModule.getCurrentActivity() method (1408c69fd8 by @cortinico)
  • APIs: Deprecate UIManagerType.DEFAULT, replaced by UIManagerType.LEGACY (a8668319ad by @mdvacca)

iOS specific

  • Image: Deprecate loadImageForURL in favor of new signature which uses completionHandlerWithMetadata (43c9a609de by Aaron Coplan)
  • NewArch: Deprecate the RCT_NEW_ARCH_ENABLED and the RCTSetNewArchEnabled (6dd721b258 by @cipolleschi)

Removed

Android specific

iOS specific

Fixed

  • Alert: Add missing type variation {login: string, password: string} to AlertType type definition to properly support login-password prompt callbacks (c6a075bcc7 by @assynu)
  • C++: Add explicit folly/dynamic.h include where it is actually used (0b1d0e84ee by @mzlee)
  • Codegen: Do not generate Apple specific files for Android (e83ece0d17 by @cipolleschi)
  • Codegen: Fixed codegen breaking when a subset of modulesConformingToProtocol fields was specified or when the value was string (e4ef685dd7 by @j-piasecki)
  • CompatCheck: Allow union changes when the new element is in the middle of the union (69ccbc3943 by @elicwhite)
  • DevSupport: Made DevServerHelper and its method open so that they can be overridden. (2a0c1e6a9e by @chrfalch)
  • Kotlin: Made function removeView open in Kotlin class (9d11dcd3b0 by @chrfalch)
  • NewAppScreen: Fix Networking URL in New app screen (89e6c72fd4 by @riteshshukla04)
  • PullToRefresh: Fixed crash in RCTPullToRefreshViewComponentView#updateProps (fab7fa88e3 by @javache)
  • Runtime: Align timer IDs and timer function argument error handling with web standards. (480a4642e5 by @kitten)
  • StyleSheet: Outline now takes into account outline-offset to calculate its border-radius, same as web. (b47bfcef5f by @jorge-cab)
  • StyleSheet: Wrong borderBottomEndRadius on RTL (68d6ada448 by @riteshshukla04)
  • Switch: Fixed switches correctly reverting to controlled state (aa8c072870 by @javache)
  • Text: Fix New Arch handling of inline views when text truncated (99f962627f by @NickGerleman)
  • Text: Fixed text not updating correctly after changing font scale in settings (c008604e0a by @j-piasecki)
  • TurboModules: Throw ParsingException when ReactModule doesn't conform to TurboModule invariants (c5132f485f by @GijsWeterings)
  • TypeScript: Fix TS docs for contentInsetAdjustmentBehavior (24ba7dfe6f by @steinalex)
  • TypeScript: Fix generated types in react-native/virtualized-lists being used without opt-in (c9f2055097 by @j-piasecki)
  • TypeScript: Fixed the generated type definitions for Animated.FlatList and Animated.SectionList to correctly infer item types. (9be5ac1010 by @j-piasecki)
  • TypeScript: Reference global.d.ts using path so they can be resolved by TSC (6399caef63 by @krystofwoldrich)
  • VirtualizeSectionList: Fix VirtualizeSectionList generic arguments (44b0f5560b) by @coado
  • VirtualizedList: Skip cloning Fragments in ListEmptyComponent to avoid onLayout warning (2b0189b964 by @mateoguzmana)

Android specific

iOS specific

  • Accessibility: RCTDeviceInfo: fix crash due to failure to get AccessibilityManager (ac23323da1 by Adam Ernst)
  • Animated: Fix Recycling of Animated Images (1a9adfba16 by @NickGerleman)
  • API: Remove deprecated ATOMIC_VAR_INIT macro in RCTProfile.m (21bf7cf6cf by @rmaz)
  • C++: Avoid build failure on Catalyst (x86_64) (0f534293af by @cipolleschi)
  • CocoaPods: Corrected the path from "$(PODS_ROOT)/fas_float/include" to "$(PODS_ROOT)/fast_float/include" in the HEADER_SEARCH_PATHS configuration. (01881017d3 by @DorianMazur)
  • CocoaPods: Put back the folly_compiler_flag function to make libraries install pods (3b17cdb643 by @cipolleschi)
  • Codegen: Fix codegen crawling all library code with componentProvider defined in config (65aa819811 by @kkafar)
  • Codegen: Fix codegen extracting .class from complex component classes (f2b19608cc by @gabrieldonadel)
  • Codegen: Generate ReactCodegen.podspec only for apps. (18a7c8d57c by @cipolleschi)
  • Codegen: Skip codegen for selectively disabled libraries in react-native.config.js (7681036537 by @aattola)
  • Codegen: Skip codegen for selectively disabled libraries in react-native.config.js (be8595b18a by @ismarbesic)
  • Image: Fix animated images missing from offscreen render (d1a090b0af by @NickGerleman)
  • Image: Fixed accessible prop no-opts on Image components (e3f7c8f456 by @jorge-cab)
  • infra: Avoid race condition crash in RCTDataRequestHandler invalidate (44810f7498 by @zhongwuzw)
  • infra: Check .pnpm folder when looking for third-party components. (91d034533e by @kirill3333)
  • infra: Fix bug: unstable_hasComponent(*) = true for unregistered components for n > 1th call. (f4d99d6a23 by @RSNara)
  • infra: Fix bug: unstable_hasComponent(*) = true for unregistered components for n > 1th call. (fa9d082747 by @RSNara)
  • infra: Ignore build/ and DerivedData/ directories when reading .plist files. (c783128f6e by @tjzel)
  • infra: Properly check for debug schemes when building hermes from source (bef5cc1007 by @WoLewicki)
  • InteropLayer: Fixed adding child views to a native view using the interop layer (d53a60dd23 by @chrfalch)
  • LogBox: Fix disappearing redbox on initial load of an invalid bundle. (4cc9db1cd5 by @aleqsio)
  • ScrollView: Fixed touch events not being dispatched to ScrollView's children when they overflow the content container (6ecd9a43f1 by @j-piasecki)
  • StyleSheet: Box shadows on iOS are faster (52173ab701 by @joevilches)
  • Swift: Make fmt and SocketRocket Swift friendly (3f41fe2948 by @cipolleschi)
  • Switch: Fix "on" and "off" announcements on Switch (db6e000023 by @joevilches)
  • Text: ParagraphState is correctly deallocated when recycling Text (a5a71f115f by @javache)
  • Text: Allow links that encorporate entire <Text> to be keyboard accessible (83fae860df by @joevilches)
  • Text: Correctly announce "link" on nested text if its the entire text element (bffb414291 by @joevilches)
  • Text: Selection range not respected when changing text or selection when selection is forced (d32ea66e6a by Olivier Bouillet)
  • TextInput: Fix TextInput onContentSizeChange event being dispatched only once on iOS on the new architecture (5fd5188172 by @j-piasecki)