Valentin Shergin 504c7694c4 Fabric: Introducing RawEvent
Summary:
@public
RawEvent represents ready-to-dispatch event data, an event that can be processed uniformly.

Reviewed By: mdvacca

Differential Revision: D8886235

fbshipit-source-id: 1c905517814330c5ecbf39f0ebc95ff2b576d1f2
2018-08-27 07:32:35 -07:00

30 lines
623 B
C++

/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "RawEvent.h"
namespace facebook {
namespace react {
RawEvent::RawEvent(
const std::string &type,
const folly::dynamic &payload,
const EventTarget &eventTarget,
const std::function<bool()> &isDispatchable
):
type(type),
payload(payload),
eventTarget(eventTarget),
isDispachable_(isDispatchable) {}
bool RawEvent::isDispachable() const {
return isDispachable_();
}
} // namespace react
} // namespace facebook