mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
1866566d52
Summary: Changelog: [internal] Introduce a way to specify React priority for events. These APIs will be called from React here: https://github.com/facebook/react/blob/0e100ed00fb52cfd107db1d1081ef18fe4b9167f/packages/react-native-renderer/src/ReactFabricHostConfig.js#L345 React does similar thing on the web: https://github.com/facebook/react/blob/8ea11306ad473b26a2c899ef7a893d25413f3510/packages/react-dom/src/client/ReactDOMHostConfig.js#L378 Take a look at D28483983 that shows how React will be calling these APIs. Reviewed By: JoshuaGross Differential Revision: D28481260 fbshipit-source-id: c965a8aa0ba5192246c216046d49bcb046152a5a
30 lines
700 B
C++
30 lines
700 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 <functional>
|
|
#include <string>
|
|
|
|
#include <jsi/jsi.h>
|
|
#include <react/renderer/core/EventTarget.h>
|
|
#include <react/renderer/core/ReactEventPriority.h>
|
|
#include <react/renderer/core/ValueFactory.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
using EventPipe = std::function<void(
|
|
jsi::Runtime &runtime,
|
|
const EventTarget *eventTarget,
|
|
const std::string &type,
|
|
ReactEventPriority priority,
|
|
const ValueFactory &payloadFactory)>;
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|