mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Changelog: [Internal] `BatchedEventQueue::enqueueUniqueEvent` goes over event queue and deletes previous event of the same type and same target. This is useful for ScrollView for example where only the latest event is relevant. This only affects ScrollView scroll event, other events take the original code path. Reviewed By: mdvacca Differential Revision: D21648906 fbshipit-source-id: a80ad652058fd50ebb55e24a87229cdc1764b591
36 lines
676 B
C++
36 lines
676 B
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
#include <react/core/EventTarget.h>
|
|
#include <react/core/ValueFactory.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
/*
|
|
* Represents ready-to-dispatch event object.
|
|
*/
|
|
class RawEvent {
|
|
public:
|
|
RawEvent(
|
|
std::string type,
|
|
ValueFactory payloadFactory,
|
|
SharedEventTarget eventTarget);
|
|
|
|
std::string type;
|
|
ValueFactory payloadFactory;
|
|
SharedEventTarget eventTarget;
|
|
};
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|