GithubHelp home page GithubHelp logo

列表循环报错 about taro HOT 4 CLOSED

cllgeek avatar cllgeek commented on May 8, 2024
列表循环报错

from taro.

Comments (4)

yuche avatar yuche commented on May 8, 2024

有几个问题:

  1. defaultFollowTags['post']prefixcls 不知道是从哪里来的,要么把他们放在 state,要么放在 render()

  2. activeItem 从来没有变过,你应该把他作为常量放在 render 里。

  3. key 使用 index 是一种反优化。

后面两个不影响,但做到了性能会好点,代码也更好维护。

from taro.

cllgeek avatar cllgeek commented on May 8, 2024

@yuche 首先,第一个问题是我全局定义的变量 ,如下:

import defaultFollowTags from '../defaultTags';
import './index.scss';

const prefixcls = 'post';

后面2个问题也不会导致截图所出现问题啊

from taro.

yuche avatar yuche commented on May 8, 2024

所以我说不影响嘛~

JSX 引用顶级作用域的变量这个确实还没有,晚些时候发个新版本支持吧。

from taro.

yuche avatar yuche commented on May 8, 2024

d559125
修复了这个问题

from taro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.