Commit Graph

6 Commits

Author SHA1 Message Date
Charles Dudley 8b53d41a88 Update RN Share.share()'s argument types to be more explicit (#44887)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44887

The previous inexact object types and documentation for Share.share()'s arguments have led to confusion in how this library should be used. This diff updates the argument types to be more explicit, and rewrites some of the documentation for clarity.

Changelog:
[General][Breaking] Update `Share.share()`'s argument types to be more explicit.

Reviewed By: NickGerleman

Differential Revision: D58224906

fbshipit-source-id: 5ac8efe7caa0ecdd430fa7a1951c73c4acd8c6a1
2024-06-13 14:55:27 -07:00
Rubén Norte 26e33a5f17 Back out "Revert D52919566: [RN] Move codegen root directory from Libraries to src"
Summary:
Changelog: [internal]

bypass-github-export-checks

Reviewed By: huntie

Differential Revision: D52958335

fbshipit-source-id: 24403cdae650fdd4ec0c739b912f69bd6cd5aaad
2024-01-22 09:47:08 -08:00
Himanshi Goyal 692f7275bc Revert D52919566: Move codegen root directory from Libraries to src
Differential Revision:
D52919566

Original commit changeset: 6de8a2d2b607

Original Phabricator Diff: D52919566

fbshipit-source-id: dc25ec0072b436c2b61bc36bd70c8ea12ab2b5c0
2024-01-22 06:53:20 -08:00
Rubén Norte 5e8ce6ca5e Move codegen root directory from Libraries to src (#42402)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42402

Now that we have 2 top level directories for JS files in the `react-native` package, we need to choose where to put the native module and native component specs, because our current infra only supports a single directory.

The options we had are:
1. Keep specs in the current directory (`Libraries`). This is a problem because it encourages us to keep adding modules in this "deprecated" directory.
2. Move specs to the new `src` directory. This requires moving the current files, but from now only we can create new specs in a private directory.
3. Modify the infra to allow multiple directories. This changes the public API for something it's likely only going to be used here.

In this PR I went for option 2) because it's the most future-proof, even though it requires a little bit more work now. I created a script to automatically copy all the specs for modules and components to `src/private/specs/components` and `src/private/specs/modules`, and changed their current locations to serve as a proxy for the new location (to avoid breaking a potentially public API).

`src/private/specs` isn't meant to be their final location. We should probably still colocate native module/component specs with the rest of their code, but we can do so when we move the code from `Libraries` to `src/private`.

Changelog: [internal]

Reviewed By: cortinico

Differential Revision: D52919566

fbshipit-source-id: 6de8a2d2b6077e4f884386567721c6bd2b88a5d3
2024-01-22 04:05:20 -08:00
Everaldo Junior caa8dbf0e9 fix: unified Share Action types (#38351)
Summary:
This pull request simplifies the type and fixes a TypeScript object destructuring problem by combining the ShareSharedAction and ShareDismissedAction types into a single ShareAction type. Enabling proper access to the activityType property without TypeScript errors.

## Changelog:
[INTERNAL] [FIXED] -  Unified ShareSharedAction and ShareDismissedAction into ShareAction. Resolved TypeScript issue with object destructuring.

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

Test Plan:
With the current typing:
![image](https://github.com/facebook/react-native/assets/7197169/40b43c40-ed6c-4b1a-8f43-0bb853920e20)

With the proposed solution:
![image](https://github.com/facebook/react-native/assets/7197169/af9e601b-780c-4c69-9a8c-11771a125a0c)

Reviewed By: NickGerleman

Differential Revision: D47527426

Pulled By: philIip

fbshipit-source-id: 9830cd993596bbac2dc07d9f37ca20b35f582156
2023-07-20 16:04:58 -07:00
Ruslan Lesiutin 714b502b0c | RN Monorepo | Migrate to package (#36434)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36434

Changelog: [Internal]

This is a squashed stack of 18 commits, starting from D43202126

allow-large-files

Reviewed By: cortinico

Differential Revision: D43977381

fbshipit-source-id: 0da552ddb85f2f61a0be0ef071915b35f3f8555c
2023-03-17 05:03:25 -07:00