Typescript 回复原生生命,回复原生生命

Typescript 回复原生生命,回复原生生命,typescript,react-native,expo,react-native-android,react-native-reanimated,Typescript,React Native,Expo,React Native Android,React Native Reanimated,在使用expo和typescript创建了minimal react本机应用程序后,我遇到了许多奇怪的错误: 应用程序在网络上运行,但在android上崩溃。我的小米S2上出现了expo错误 有一个代码我正在开始(在最终没有路由器): package.json tsconfig 也许有人知道什么是错的?还可以添加完整的回购链接。Reanimated刚刚发布了一个稳定的版本。你可以试试这个Reanimated刚刚发布了一个稳定的版本。你可以试试这个复活2仍在阿尔法状态。如果您认为您发现了一个bug

在使用expo和typescript创建了minimal react本机应用程序后,我遇到了许多奇怪的错误:

  • 应用程序在网络上运行,但在android上崩溃。我的小米S2上出现了expo错误
  • 有一个代码我正在开始(在最终没有路由器):

  • package.json
  • tsconfig

  • 也许有人知道什么是错的?还可以添加完整的回购链接。

    Reanimated刚刚发布了一个稳定的版本。你可以试试这个

    Reanimated刚刚发布了一个稳定的版本。你可以试试这个

    复活2仍在阿尔法状态。如果您认为您发现了一个bug,我建议您尝试创建一个mcve()并将其发布到。此外,您没有使用expo sdk 39中假定的版本。按照《复活2》中的说明操作,它仍处于阿尔法状态。如果您认为您发现了一个bug,我建议您尝试创建一个mcve()并将其发布到。此外,您没有使用expo sdk 39中假定的版本。按照中的说明操作
    import React from 'react';
    import { Button, StyleSheet, View  } from 'react-native';
    
    const styles = StyleSheet.create({
        box: {
            width: '50px',
            height: '50px',
            backgroundColor: '#000000'
        }
    })
    
    
    export const SignInScreen = (): JSX.Element => {
    
        // const offset = useSharedValue(0);
    
        // const animatedStyles = useAnimatedStyle(() => {
        //   return {
        //     transform: [{ translateX: offset.value * 255 }],
        //   };
        // });
      
        return (
          <>
            {/* <Animated.View style={[styles.box]} /> */}
            <View style={[styles.box]} />
            <Button
              onPress={() => {
                // offset.value = withSpring(Math.random());
              }}
              title="Move"
            />
          </>
        );
    };
    
    const styles = StyleSheet.create({
        box: {
            width: '50px',
            height: '50px',
            backgroundColor: '#000000'
        }
    })
    
    
    export const SignInScreen = (): JSX.Element => {
    
        const offset = useSharedValue(0);
    
        const animatedStyles = useAnimatedStyle(() => {
          return {
            transform: [{ translateX: offset.value * 255 }],
          };
        });
      
        return (
          <>
            <Animated.View style={[styles.box]} />
            {/* <View style={[styles.box]} /> */}
            <Button
              onPress={() => {
                offset.value = withSpring(Math.random());
              }}
              title="Move"
            />
          </>
        );
    };
    
    module.exports = (api) => {
        api.cache(true);
        return {
            presets: ['babel-preset-expo'],
            plugins: [
                [
                    'module-resolver',
                    {
                        alias: {
                            assets: './src/assets',
                            components: './src/components',
                            navigation: './src/navigation',
                            screens: './src/screens',
                            store: './src/store',
                            themes: './src/themes',
                        },
                    },
                    'react-native-reanimated/plugin'
                ],
            ],
            env: {
                production: {
                    plugins: ['react-native-paper/babel'],
                },
            },
        };
    };
    
    {
      "main": "node_modules/expo/AppEntry.js",
      "scripts": {
        "start": "expo start",
        "android": "expo start --android",
        "ios": "expo start --ios",
        "web": "expo start --web",
        "eject": "expo eject"
      },
      "dependencies": {
        "@react-native-community/masked-view": "0.1.10",
        "@react-navigation/native": "^5.7.6",
        "@react-navigation/stack": "^5.9.3",
        "expo": "~39.0.2",
        "expo-status-bar": "~1.0.2",
        "react": "16.13.1",
        "react-dom": "16.13.1",
        "react-native": "https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz",
        "react-native-anchor-point": "^1.0.1",
        "react-native-gesture-handler": "~1.7.0",
        "react-native-paper": "^4.2.0",
        "react-native-reanimated": "^2.0.0-alpha.7",
        "react-native-safe-area-context": "3.1.4",
        "react-native-screens": "~2.10.1",
        "react-native-svg": "12.1.0",
        "react-native-web": "~0.13.12",
        "styled-components": "^5.2.0"
      },
      "devDependencies": {
        "@types/react": "~16.9.35",
        "@types/react-dom": "~16.9.8",
        "@types/react-native": "~0.63.2",
        "@types/styled-components": "^5.1.4",
        "react-native-web": "~0.13.7",
        "typescript": "~3.9.5"
      },
      "private": true
    }
    
    {
        "compilerOptions": {
            "baseUrl": "./src",
            "allowSyntheticDefaultImports": true,
            "jsx": "react-native",
            "lib": ["dom", "esnext"],
            "moduleResolution": "node",
            "noEmit": true,
            "skipLibCheck": true,
            "resolveJsonModule": true,
            "strict": true,
            "paths": {
                "assets": ["./src/assets"],
                "components": ["./src/components"],
                "navigation": ["./src/navigation"],
                "screens": ["./src/screens"],
                "store": ["./src/store"],
                "themes": ["./src/themes"],
            }
        }
    }