小编kar*_*ain的帖子

使用 Windows 为 IOS 构建 Expo 应用程序

我想知道是否有任何方法可以让我使用 Windows构建我的Expo应用程序。每当我运行 exp build:ios 时,我都会收到以下警告:

这台机器上似乎没有启用 WSL。从 Windows 应用商店下载 Linux 发行版,然后在管理 powershell 中,请运行:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem->Linux

并至少运行一次新的 Linux 安装

我应该为此使用什么应用程序?即使我这样做了,Expo 会允许我为 IOS 构建吗?

或者,我可以使用 Microsoft Appcenter 之类的服务为我构建它吗?

ios react-native expo

4
推荐指数
2
解决办法
8772
查看次数

在水平FlatList上反应本地滚动滞后

我开始通过构建Reddit Client来学习本机响应。在一个组件中,我从Reddit加载了照片并将它们显示在水平FlatList中,但是当我滚动浏览列表时,FPS显着下降。

即使集成“ react-native-expo-image-cache”,我也会遇到相同的结果。我当时想使用“反应迅速的图像”,但我不想脱离Expo来简化构建过程并避免安装Android Studio或XCode。

我正在使用Nexus 6P上的expo应用进行测试

有什么方法可以改善我的表现吗?谢谢!

这是我的源代码:(https://snack.expo.io/BklplJQIz

import React, { Component } from "react";
import { View, Image, FlatList } from "react-native";

export default class App extends Component {
  constructor(props) {
    super(props);
    this.state = { content: [] };
  }
  componentDidMount() {
    fetch("https://www.reddit.com/r/pics/.json")
      .then(response => response.json())
      .then(d => {
        this.setState({
          content: d.data.children.map(function(c) {
            return {
              url: c.data.preview.images["0"].source.url,
              height: c.data.preview.images["0"].source.height,
              width: c.data.preview.images["0"].source.width,
              title: c.data.title
            };
          })
        });
      })
      .catch(error => {
        console.error(error);
      });
  }
  render() {
    return ( …
Run Code Online (Sandbox Code Playgroud)

reddit reactjs react-native

1
推荐指数
1
解决办法
2030
查看次数

标签 统计

react-native ×2

expo ×1

ios ×1

reactjs ×1

reddit ×1