Repository navigation
Replies: 25 comments 46 replies
|
Hey @huntie I believe that change will break You can see here how it's done: https://github.com/kirillzyusko/react-native-keyboard-controller/blob/main/src/monkey-patch.android.ts (obviously the solution is a dirty workaround, but it was working for years 🙈) I'll be happy to discuss a better solution/alternative for that or at least add temporarily |
This comment was marked as off-topic.
This comment was marked as off-topic.
[Done] Expose
|
[Done] Expose
|
|
Sorry I dunno if this is the right place to say that, I tried the new strict api on my react native project and I'm getting 94 parsing errors, I had to disabled it for now. Let me know if you need any more info See parsing errorsFound 94 errors in the same file, starting at: node_modules/react-native/Libraries/ReactPrivate/ReactNativePrivateInterface.js:11. I've some custom tsconfig but even after disabling them the result is the same. |
|
react-native-network-logger uses |
[Done] Expose
|
|
Hello, migrating these to import from The new imports are done like this. This could be valuable to mention in the FAQ for library maintainers here. |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Thanks for the clarification! I wasn’t aware that deep imports were so widely used in the ecosystem. Looking forward to seeing what alternatives will be officially supported. |
|
Does it mean the following mock will stop working in RN 0.82? hence, I should convert that into this: Could you confirm that? |
[Done] Expose
|
[Resolved]
|
|
Please expose import parseErrorStack from "react-native/Libraries/Core/Devtools/parseErrorStack";
I notice they're not currently in the provisional public API. Currently both React Navigation and Sentry are manually parsing the error stack, which seems fragile (especially with Static Hermes on the horizon), and an unreasonable maintenance burden to have to do in userland. I also want to implement proper stack traces for my userland util.inspect() polyfill that brings |
|
I am currently relying on a deep import of The const ReactNative = require("react-native");
// This approach only works with a deep import, not a shallow import.
const Platform = require("react-native/Libraries/Utilities/Platform");
/** @type {"ios" | "android"} */
const OS = "ios";
/** @type {import("react-native").Platform} */
const PlatformCommon = {
OS,
constants: {
reactNativeVersion: {
major: 1000,
minor: 0,
patch: 0,
prerelease: undefined,
},
},
__constants: null,
isPad: false,
isTV: false,
isVision: false,
isTesting: undefined,
isDisableAnimations: undefined,
isMacCatalyst: false,
select: function select(spec) {
return OS in spec
? spec[OS]
: "native" in spec
? spec.native
: spec.default;
},
};
// TODO: find a way to swap between these based on test
const IosPlatform = { ...PlatformCommon, Version: "17.5" };
const AndroidPlatform = { ...PlatformCommon, Version: 33 };
const ResolvedPlatform = OS === "ios" ? IosPlatform : AndroidPlatform;
Object.assign(Platform, ResolvedPlatform);
Object.defineProperties(ReactNative, {
Platform: {
get: () => ResolvedPlatform,
},
});To be clear, I'm not proposing to expose the |
[Done] Expose
|
[Done] Expose
|
Re.Pack Development APIsContextRe.Pack's HMR client (WebpackHMRClient) reimplements React Native's HMRClient and uses the following APIs: 1. NativeRedBox & NativeExceptionsManagerModule Paths:
Purpose: Implementation: if (__PLATFORM__ === 'ios') {
const NativeRedBox =
require('react-native/Libraries/NativeModules/specs/NativeRedBox').default;
NativeRedBox?.dismiss?.();
} else {
const NativeExceptionsManager =
require('react-native/Libraries/Core/NativeExceptionsManager').default;
NativeExceptionsManager?.dismissRedbox();
}Source: 2. DevLoadingViewModule Paths:
Purpose: Implementation: const LoadingView = require('react-native/Libraries/Utilities/DevLoadingView');
LoadingView.showMessage(text, type);Source: |
|
Hi, in react-native-enriched we would like to use import TextInputState from 'react-native/Libraries/Components/TextInput/TextInputState'We need this to ensure that EnrichedTextInput and TextInput behave consistently inside scrollable elements (e.g., |
|
Hi, I have just started seeing this warning after upgrading. I use
What alternative do you suggest? Thanks. |
|
im creating a native video player implementation and im relying on import resolveAssetSource from 'react-native/Libraries/Image/resolveAssetSource'; |
|
I'm currently using |
|
I'm currently using |
|
We use usePressability so we can avoid wrapping a new component and let our View/Text have the nicer onPress behavior like Pressables do: https://github.com/tamagui/tamagui/blob/main/code/core/core/src/vendor/Pressability.native.tsx |
|
Hello, In I wanted to ask whether you've considered exposing Thanks in advance! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Important
Shipped in 0.87! This thread is now locked. Please go to this discussion thread for further feedback: #1015
Introduction
See the RFC | See the 0.80 release post
🚨 Key change: In React Native 0.80, we are deprecating subpath imports (or "deep imports") from the
react-nativenpm package.By defining a clear, root-level JavaScript API contract, we aim to minimise future React Native breaking changes and improve long-term predictability for the ecosystem.
Why it matters: While initially deprecated with warnings, we aim to remove these import paths entirely, which will be a breaking change.
This discussion thread
Please raise issues/questions about APIs you are using that are affected by this change. Over our API consultation period (beginning 0.80), we'll evaluate requests for exposing new APIs at the root, or providing alternatives.
Planned sequencing
"exports"and the Strict TypeScript API.What we've actioned!
https://github.com/facebook/react-native/issues?q=sort%3Acreated-desc%20label%3A%22JS%20API%20refinements%20(2025)%22
All reactions