-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
Ran CommandsOne of our bots successfully processed a command.One of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
Today we use NativeMethodsMixin likes this:
NativeMethodsMixin.measure.call(ref, callback)
We could do something like:
const NativeMethodsMixinAsPromise = (ref) => {
return new Promise((resolve, reject) => {
try {
NativeMethodsMixin.measure.call(ref, (x, y, width, height) => resolve(x, y, width, height))
} catch (err) {
reject(err);
}
});
}
Something along these lines, so we can use async
and await
and have a more fluid code.
Can't we make it like this on react-native core?
Metadata
Metadata
Assignees
Labels
Ran CommandsOne of our bots successfully processed a command.One of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.