react-native-macos/packages
acdlite c2be0ad40e Rethrow errors from form actions (#26689)
Summary:
This is the next step toward full support for async form actions.

Errors thrown inside form actions should cause the form to re-render and
throw the error so it can be captured by an error boundary. The behavior
is the same if the `<form />` had an internal useTransition hook, which
is pretty much exactly how we implement it, too.

The first time an action is called, the form's HostComponent is
"upgraded" to become stateful, by lazily mounting a list of hooks. The
rest of the implementation for function components can be shared.

Because the error handling behavior added in this commit is just using
useTransition under-the-hood, it also handles pending states, too.
However, this pending state can't be observed until we add a new hook
for that purpose. I'll add this next.

DiffTrain build for commit fd3fb8e3c5.

Changelog: [Internal]

Reviewed By: poteto

Differential Revision: D45238266

Pulled By: kassens

fbshipit-source-id: 93fe8581172522f955278918bf97a0eb54daeeed
2023-04-25 09:58:50 -07:00
..
assets Re-sync repo after ShipIt change - Removal of BUCK files (#36955) 2023-04-19 12:12:04 +01:00
babel-plugin-codegen Re-sync repo after ShipIt change - Removal of BUCK files (#36955) 2023-04-19 12:12:04 +01:00
eslint-config-react-native-community Re-sync repo after ShipIt change - Removal of BUCK files (#36955) 2023-04-19 12:12:04 +01:00
eslint-plugin-react-native-community Re-sync repo after ShipIt change - Removal of BUCK files (#36955) 2023-04-19 12:12:04 +01:00
eslint-plugin-specs Re-sync repo after ShipIt change - Removal of BUCK files (#36955) 2023-04-19 12:12:04 +01:00
hermes-inspector-msggen msggen support for cdp previews (#36781) 2023-04-04 14:17:43 -07:00
metro-config Drop internal base config merge in metro-config (#36777) 2023-04-18 14:31:46 -07:00
normalize-color Re-sync repo after ShipIt change - Removal of BUCK files (#36955) 2023-04-19 12:12:04 +01:00
polyfills Re-sync repo after ShipIt change - Removal of BUCK files (#36955) 2023-04-19 12:12:04 +01:00
react-native Rethrow errors from form actions (#26689) 2023-04-25 09:58:50 -07:00
react-native-bots Do not run OSS changelog validator on diffs exported from Phabricator (#36994) 2023-04-20 10:11:43 -07:00
react-native-codegen extract throwIfEventHasNoName into error-utils (#37071) 2023-04-25 04:17:10 -07:00
react-native-codegen-typescript-test Add `@react-native/codegen-typescript-test` to verify .d.ts files in `@react-native/codegen` (1) (#36562) 2023-04-05 07:38:25 -07:00
react-native-gradle-plugin Gradle to 8.1 (#37018) 2023-04-21 04:52:54 -07:00
rn-tester Reapply Fix escaping in the URL conversion (#36949) 2023-04-25 04:43:21 -07:00
virtualized-lists Codemod `$Shape` to `Partial` in xplat, suppressing errors [4] (#36960) 2023-04-18 13:49:07 -07:00