mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
Fabric: Fixing a typo/error in ConcreteState
Summary: I don't recall why the mutation function return rvalue reference, but it is totally incorrect (the function cannot own the object, so returning a reference introducing a dungling pointer and will crash). Reviewed By: mdvacca Differential Revision: D15156312 fbshipit-source-id: 497d10de22a41906efe71cd10139e3710ae11a79
This commit is contained in:
committed by
Facebook Github Bot
parent
fd6386a07e
commit
3238d3d3b4
@@ -66,7 +66,7 @@ class ConcreteState : public State {
|
||||
* of conflict.
|
||||
*/
|
||||
void updateState(
|
||||
std::function<Data && (const Data &oldData)> callback,
|
||||
std::function<Data(const Data &oldData)> callback,
|
||||
EventPriority priority = EventPriority::AsynchronousBatched) const {
|
||||
stateCoordinator_->dispatchRawState(
|
||||
{[stateCoordinator = stateCoordinator_,
|
||||
|
||||
Reference in New Issue
Block a user