Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions apps/expo-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"dev:web": "expo start --web --clear"
},
"dependencies": {
"@expo/metro-runtime": "~55.0.11",
"@expo/metro-runtime": "~56.0.21",
"example-ui": "0.0.55",
"expo": "^55.0.0",
"expo-build-properties": "~55.0.13",
"expo-status-bar": "~55.0.6",
"react": "19.2.0",
"react-dom": "19.2.0",
"react-native": "0.83.6",
"expo": "^56.0.0",
"expo-build-properties": "~56.0.27",
"expo-status-bar": "~56.0.4",
"react": "19.2.3",
"react-dom": "19.2.3",
"react-native": "0.85.3",
"react-native-web": "^0.21.0",
"react-strict-dom": "0.0.55"
},
Expand Down
14 changes: 7 additions & 7 deletions apps/platform-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"dev:web": "expo start --web --clear"
},
"dependencies": {
"@expo/metro-runtime": "~55.0.11",
"expo": "^55.0.0",
"expo-build-properties": "~55.0.13",
"expo-status-bar": "~55.0.6",
"react": "19.2.0",
"react-dom": "19.2.0",
"react-native": "0.83.6",
"@expo/metro-runtime": "~56.0.21",
"expo": "^56.0.0",
"expo-build-properties": "~56.0.27",
"expo-status-bar": "~56.0.4",
"react": "19.2.3",
"react-dom": "19.2.3",
"react-native": "0.85.3",
"react-native-web": "^0.21.0",
"react-strict-dom": "0.0.55"
},
Expand Down
1,895 changes: 889 additions & 1,006 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions packages/benchmarks/perf/mocks/ViewNativeComponent.js

This file was deleted.

2 changes: 2 additions & 0 deletions packages/benchmarks/perf/mocks/react-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ export const TextInput = 'TextInput';

export const Text = 'Text';

export const unstable_NativeView = 'ViewNativeComponent';

export const unstable_TextAncestorContext = 'TextAncestorContext';

export const View = 'View';
Expand Down
7 changes: 0 additions & 7 deletions packages/benchmarks/perf/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ const config = [
{
find: /^react-native$/,
replacement: path.resolve(__dirname, './mocks/react-native.js')
},
{
find: 'react-native/Libraries/Components/View/ViewNativeComponent',
replacement: path.resolve(
__dirname,
'./mocks/ViewNativeComponent.js'
)
}
]
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/react-strict-animated/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@
"peerDependencies": {
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-native": ">=0.82.0"
"react-native": ">=0.85.0"
}
}
3 changes: 2 additions & 1 deletion packages/react-strict-animated/src/native/Animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ import type {
SpringAnimationConfig,
TimingAnimationConfig
} from '../shared/SharedAnimatedTypes';
import type { CompositeAnimation } from 'react-native/Libraries/Animated/Animated';
import { Animated, useAnimatedValue } from 'react-native';

type CompositeAnimation = Animated.CompositeAnimation;

export function useValue(initialValue: number): Animated.Value {
return useAnimatedValue(initialValue, { useNativeDriver: true });
}
Expand Down
3 changes: 1 addition & 2 deletions packages/react-strict-animated/src/native/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
/* eslint-disable no-unreachable */

import type { AnimatedStyleValue } from '../shared/SharedAnimatedTypes';
import type { Text, View } from 'react-native';
import type { ImageProps } from 'react-native/Libraries/Image/ImageProps';
import type { ImageProps, Text, View } from 'react-native';
import type { html } from 'react-strict-dom';

import * as React from 'react';
Expand Down
3 changes: 1 addition & 2 deletions packages/react-strict-animated/src/native/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ import type {
SpringAnimationConfig,
TimingAnimationConfig
} from '../shared/SharedAnimatedTypes';
import type { CompositeAnimation } from 'react-native/Libraries/Animated/Animated';

import { Animated } from 'react-native';

export type AnimatedValue = Animated.Value;
export type CompositeAnimation = Animated.CompositeAnimation;
export type {
CompositeAnimation,
SpringAnimationConfig,
TimingAnimationConfig,
InterpolationConfig
Expand Down
3 changes: 2 additions & 1 deletion packages/react-strict-dom/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Breaking changes

* [Native] React Strict DOM and React Strict Animated now require `react-native >=0.82.0` for native builds that use RN DOM Node APIs.
* [Native] React Strict DOM and React Strict Animated now require `react-native >=0.85.0` for native builds that use RN DOM Node APIs.

### Fixes

Expand All @@ -13,6 +13,7 @@
### Internal

* [Native] `useStrictDOMElement` now wraps the RN host node with `Object.create(node)` and defines only strict-dom overrides as own properties.
* [Native] Replaced every deep import into `react-native/Libraries/*` with the equivalent public `react-native` export.

## 0.0.55 (Jan 9, 2026)

Expand Down
2 changes: 1 addition & 1 deletion packages/react-strict-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"peerDependencies": {
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-native": ">=0.82.0"
"react-native": ">=0.85.0"
},
"engines": {
"node": ">=20.11.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @flow strict-local
*/

import type { EventSubscription } from 'react-native/Libraries/vendor/emitter/EventEmitter';
import type { EventSubscription } from 'react-native';

import * as ReactNative from '../react-native';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type StrictInputProps = StrictReactDOMInputProps | StrictReactDOMTextAreaProps;
// Helper to update cached selection state for selectionStart/End polyfill
function updateCachedSelection(
node: ?HostInstance,
selection: ?{ start: number, end: number }
selection: ?Readonly<{ start: number, end: number }>
) {
if (node != null && selection != null) {
// $FlowFixMe[class-object-subtyping] - write polyfill-only cache fields.
Expand All @@ -57,7 +57,7 @@ function applyTextInputProps(
props: StrictInputProps,
tagName: string,
mergedRef: CallbackRef<HostInstance>,
cacheSelection: (selection: ?{ start: number, end: number }) => void
cacheSelection: (selection: ?Readonly<{ start: number, end: number }>) => void
): void {
const {
autoCapitalize,
Expand Down Expand Up @@ -244,7 +244,7 @@ export function createStrictDOMTextInputComponent<
// Reads nodeRef lazily so the ref object never enters the plain props
// builder, which would trip react-rule-unsafe-ref.
const cacheSelection = React.useCallback(
(selection: ?{ start: number, end: number }) => {
(selection: ?Readonly<{ start: number, end: number }>) => {
updateCachedSelection(nodeRef.current, selection);
},
[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
*/

import type { CustomProperties } from '../../types/styles';
import type { PressEvent, ReactNativeProps } from '../../types/renderer.native';
import type {
GestureResponderEvent,
ReactNativeProps
} from '../../types/renderer.native';
import type { StrictProps as StrictPropsOriginal } from '../../types/StrictProps';
import type { Style } from '../../types/styles';

Expand Down Expand Up @@ -210,7 +213,7 @@ function applyHtmlProps(
}
// TODO: remove once PointerEvent onClick is available
if (onClick != null) {
nativeProps.onPress = function (e: PressEvent) {
nativeProps.onPress = function (e: GestureResponderEvent) {
const { nativeEvent } = e;
const event: unknown = nativeEvent;
let altKey = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
* @flow strict-local
*/

import ViewNativeComponent from 'react-native/Libraries/Components/View/ViewNativeComponent';
import { unstable_NativeView as ViewNativeComponent } from 'react-native';
export { ViewNativeComponent };
41 changes: 15 additions & 26 deletions packages/react-strict-dom/src/types/renderer.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,23 @@
* @flow strict
*/

// $FlowFixMe[nonstrict-import]
import type AnimatedNode from 'react-native/Libraries/Animated/nodes/AnimatedNode';
import type {
// $FlowFixMe[nonstrict-import]
CompositeAnimation
} from 'react-native/Libraries/Animated/Animated';
import type {
GestureResponderEvent,
// $FlowFixMe[nonstrict-import]
// $FlowFixMe[missing-export]
Props as TextInputProps
} from 'react-native/Libraries/Components/TextInput/TextInput';
import type {
HostInstance,
// $FlowFixMe[nonstrict-import]
ImageProps
} from 'react-native/Libraries/Image/ImageProps';
import type {
// $FlowFixMe[missing-export]
PressEvent,
// $FlowFixMe[missing-export]
SyntheticEvent
} from 'react-native/Libraries/Types/CoreEventTypes';
import type {
ImageProps,
// $FlowFixMe[nonstrict-import]
TextInputProps,
// $FlowFixMe[nonstrict-import]
ViewProps
} from 'react-native/Libraries/Components/View/ViewPropTypes';
// $FlowFixMe[nonstrict-import]
import type { HostInstance } from 'react-native';
} from 'react-native';
import type { CallbackRef } from './react';

// $FlowFixMe[nonstrict-import]
import { Animated } from 'react-native';

type ReactNativeProps = {
accessible?: ViewProps['accessible'],
accessibilityLabel?: ViewProps['accessibilityLabel'],
Expand Down Expand Up @@ -103,7 +91,7 @@ type ReactNativeProps = {
onPointerOut?: ViewProps['onPointerOut'],
onPointerOver?: ViewProps['onPointerOver'],
onPointerUp?: ViewProps['onPointerUp'],
onPress?: ?(event: PressEvent) => void,
onPress?: ?(event: GestureResponderEvent) => void,
onScroll?: ?(event: unknown) => void,
onSelectionChange?: TextInputProps['onSelectionChange'],
onSubmitEditing?: TextInputProps['onSubmitEditing'],
Expand Down Expand Up @@ -148,17 +136,18 @@ type ReactNativeStyleValue =
| number
| string
| ReactNativeTransform[]
| AnimatedNode;
| Animated.Node;

type ReactNativeStyle = { [string]: ?ReactNativeStyleValue };

type CompositeAnimation = Animated.CompositeAnimation;

export type {
CompositeAnimation,
GestureResponderEvent,
HostInstance,
PressEvent,
ReactNativeProps,
ReactNativeStyle,
ReactNativeStyleValue,
ReactNativeTransform,
SyntheticEvent
ReactNativeTransform
};

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ export const View = 'View';

export const experimental_LayoutConformance = 'LayoutConformance';

export const unstable_NativeView = 'ViewNativeComponent';

export const unstable_TextAncestorContext = 'TextAncestorContext';

export const useColorScheme = jest.fn().mockReturnValue('light');
Expand Down
Loading