Commit Graph

9 Commits

Author SHA1 Message Date
Andrew Clark 77c4ac2ce8 [useFormState] Allow sync actions (#27571)
Updates useFormState to allow a sync function to be passed as an action.

A form action is almost always async, because it needs to talk to the
server. But since we support client-side actions, too, there's no reason
we can't allow sync actions, too.

I originally chose not to allow them to keep the implementation simpler
but it's not really that much more complicated because we already
support this for actions passed to startTransition. So now it's
consistent: anywhere an action is accepted, a sync client function is a
valid input.
2023-10-31 23:32:31 -04:00
Andrew Clark 9cdf8a99ed [Codemod] Update copyright header to Meta (#25315)
* Facebook -> Meta in copyright

rg --files | xargs sed -i 's#Copyright (c) Facebook, Inc. and its affiliates.#Copyright (c) Meta Platforms, Inc. and affiliates.#g'

* Manual tweaks
2022-10-18 11:19:24 -04:00
Jan Kassens fc16293f3f Flow: well_formed_exports for devtools (#25266) 2022-09-15 16:45:29 -04:00
Jan Kassens 8003ab9cf5 Flow: remove explicit object syntax (#25223) 2022-09-09 16:03:48 -04:00
Brian Vaughn fc33f12bde Remove unstable scheduler/tracing API (#20037) 2021-04-26 19:16:18 -04:00
Brian Vaughn 8e1434e80e Added FB copyright header 2019-08-27 10:54:01 -07:00
Brian Vaughn 183f96f2ac Prettier 2019-08-13 17:58:03 -07:00
Brian Vaughn 08743b1a8e Reorganized folders into packages/* 2019-08-13 15:59:43 -07:00
Brian Vaughn ec7ef50e8b Reorganized things again into packages 2019-08-13 11:37:25 -07:00