Commit Graph

13 Commits

Author SHA1 Message Date
Sam Zhou 6c7c518d42 Turn on experimental.natural_inference.local_object_literals.followup_fix in xplat (#53528)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53528

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D81289138

fbshipit-source-id: 05e2f5ad337f616a92df97ea52af8891448e122f
2025-08-29 06:25:57 -07:00
Sam Zhou cf664c65e2 Standardize subtyping error code into incompatible-type in react native and metro (#53312)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53312

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D80400976

fbshipit-source-id: 196af69c0b9621b2a2675b232406639773e04933
2025-08-18 09:04:31 -07:00
Tim Yung 2f77e0d7fd RN: Prefer Destructured Import for useContext (#51412)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51412

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74895839

fbshipit-source-id: 9ab9fc8bdee6d1764ad86fa2165da32cb266174e
2025-05-16 16:33:18 -07:00
Tim Yung 00108a1ac3 RN: Prefer Destructured Import for useState (#51403)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51403

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74891875

fbshipit-source-id: 981e85b5da84950c9e66e8d6b6496019e536711d
2025-05-16 16:33:18 -07:00
Dawid Małecki 9c5cf4e9c4 Align AnimateProps to match TS types (#50214)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50214

This diff is a second step toward the TS AnimatedProps alignment. In this change the rest of the extended types and recursions in `WithAnimatedValue` are applied.

Changelog:
[Internal] - Aligned AnimateProps to match TS types.

Reviewed By: huntie

Differential Revision: D71623036

fbshipit-source-id: d4777e25c3bf3119608938ee4cd246cdc4c4f7ee
2025-03-25 03:47:30 -07:00
Sam Zhou 41f525ccae Pre-suppress unsafe string key access errors in xplat/js (#44221)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44221

This diff pre-suppresses errors of the following pattern, to prepare for the next Flow release.

```
declare const obj: {foo: string};
declare const key: string;
obj[key]; // error: invalid-computed-prop
```

Changelog: [Internal]

Reviewed By: alexmckenley

Differential Revision: D56477899

fbshipit-source-id: 5676b8685bd3157a519fe433cfce0fa28e003502
2024-04-23 11:36:14 -07:00
zhongwuzw 297ae37367 Fix rn-tester Animated example label color in dark mode (#44127)
Summary:
Fix rn-tester Animated example label color in dark mode

## Changelog:

[INTERNAL] [FIXED] - Fix rn-tester Animated example label color in dark mode

Pull Request resolved: https://github.com/facebook/react-native/pull/44127

Test Plan:
Animated examples render incorrectly in dark mode. So let's fix them. :)

![image](https://github.com/facebook/react-native/assets/5061845/ad882ee2-d156-4b24-8ddb-0ec27dc27cba)

Reviewed By: fabriziocucci

Differential Revision: D56234954

Pulled By: javache

fbshipit-source-id: 5fd8604077ced9aa3acd23a7dc9ebd8476a7330b
2024-04-17 08:21:38 -07:00
Moti Zilberman d6e0bc714a Enable lint/sort-imports everywhere (#41334)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41334

TSIA.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D51025812

fbshipit-source-id: e10d437be775a6b80946483aa96460f34927f870
2023-11-06 12:59:38 -08:00
Gabriel Donadel Dall'Agnol 7e26e0270b Fix createAnimatedStyle when providing undefined transform style (#41176)
Summary:
https://github.com/facebook/react-native/pull/35198 introduced a regression where if an `{transform: undefined}` style is provided to an Animated View a `Cannot read property 'map' of undefined` type error is thrown

<img src="https://github.com/facebook/react-native/assets/11707729/bb87781e-1ba7-40ec-879d-a57cef3e10d9" height="200" />

## Changelog:

[GENERAL] [FIXED] - Fix `createAnimatedStyle` when providing an undefined transform style

Pull Request resolved: https://github.com/facebook/react-native/pull/41176

Test Plan:
<details>
  <summary>Render an `Animated.View` passing `style={{transform: undefined}}`</summary>

E.g.

```
const UndefinedTransform = () => {
  return (
    <View>
      <Animated.View style={{transform: undefined}} />
    </View>
  );
};
```
</details>

### RNTester
1. Open the RNTester app and navigate to the Animated page
2. Navigate to the Transform Styles page
3. App should not throw any errors

<table>
    <tr><th>Before</th><th>After</th></tr>
    <tr>
        <td><video src="https://github.com/facebook/react-native/assets/11707729/92ba9c3b-60b0-4805-8080-0e7fb7c00345"/></td>
        <td><video src="https://github.com/facebook/react-native/assets/11707729/80e2bba8-6ff6-4cf5-bcb8-26de0b869036"/></td>
    </tr>
</table>

Reviewed By: fabriziocucci

Differential Revision: D50638415

Pulled By: javache

fbshipit-source-id: 0ee949f019a77b8bef557888694e0e8404810105
2023-10-25 05:59:19 -07:00
Genki Kondo 645b643f68 Enable animating skew in transforms with native driver (#36933)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36933

Skew is already supported on the platform side; there's no reason to disable animating it.

Changelog:
[General][Added] - Enable animating skew in transforms with native driver

Reviewed By: mdvacca

Differential Revision: D45053914

fbshipit-source-id: 31198c35eeb55211a3ff88c968707db65b025f49
2023-04-18 11:53:57 -07:00
Sam Zhou ccefad049a Enable LTI in react-native
Summary: Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D41788271

fbshipit-source-id: 8e40dc3279ee0283b2845b9559a80862fdf59a17
2022-12-06 19:34:14 -08:00
Andres Suarez 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00
Luna Wei 893aff2e20 Animated Transform Styles Example
Summary: Changelog: [Internal] - Add an example to demo all the transform properties.

Reviewed By: charlesbdudley

Differential Revision: D29865790

fbshipit-source-id: 79174457071de8fca9b0aab8bf8dcc543ea9a0a3
2021-07-26 17:17:58 -07:00