Reanimated 2 не удалось создать рабочуюли br/>
Это мой babel.config.js < /code> файл: < /p>
Код: Выделить всё
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: ['react-native-reanimated/plugin'],
};
< /code>
my code: < /p>
import React, { useRef, useState } from 'react'
import { View, useWindowDimensions, Button } from 'react-native'
import Animated, { runOnUI } from 'react-native-reanimated';
export default function Login() {
const { width, height } = useWindowDimensions();
// const value = useSharedValue(0);
function someWorklet(greeting: any) {
'worklet';
console.log("Hey I'm running on the UI thread");
}
return (
runOnUI(someWorklet)('Howdy')} />
);
}
Подробнее здесь: https://stackoverflow.com/questions/671 ... nimateds-b
Мобильная версия