coolicer
V2EX  ›  Node.js

Riot,有人用过这个 UI 库吗?

  •  
  •   coolicer · Jan 23, 2015 · 5816 views
    This topic created in 4311 days ago, the information mentioned may be changed or developed.
    18 replies  •  2015-03-16 08:48:24 +08:00
    ariesjia
    ariesjia
    Jan 23, 2015
    1
    用过他的1.0 在mobile项目中用了,
    最近他刚更新了2.0 感觉看起来挺棒的,准备搞搞
    yakczh
    yakczh
    Jan 23, 2015❤️1
    2
    这个相比React有什么优势吗?
    coolicer
    coolicer
    OP
    Jan 24, 2015
    3
    @yakczh 官网有对比啊。轻量吧,简洁。我也是刚看到,还不是很懂。
    coolicer
    coolicer
    OP
    Jan 24, 2015
    4
    @ariesjia 那个tag文件的html和riot.tag里面的html怎么是一样的?看那个todo
    ariesjia
    ariesjia
    Jan 24, 2015
    5
    @coolicer 那个js 是用tag 编译成的, 就和react 的JSX一样。
    ariesjia
    ariesjia
    Jan 24, 2015
    6
    @yakczh 优势就是轻量,而且更加的容易简单。
    coolicer
    coolicer
    OP
    Jan 24, 2015❤️1
    7
    @ariesjia 没玩过react,还能生成JS?要服务端吗 = =
    yakczh
    yakczh
    Jan 24, 2015❤️1
    8
    @ariesjia 必须要编译才行吗? 如果直接写在html页面里,怎么写?
    yakczh
    yakczh
    Jan 24, 2015
    9
    安装 riot 报错
    npm ERR! [email protected] install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] install script.
    npm ERR! This is most likely a problem with the gaze package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR! node-gyp rebuild
    npm ERR! You can get their info via:
    npm ERR! npm owner ls gaze
    npm ERR! There is likely additional logging output above.
    npm ERR! System Windows_NT 6.1.7601
    npm ERR! command "G:\\nodejs\\\\node.exe" "G:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "riot" "-g"
    npm ERR! cwd d:\www\js\reactjs\riotjs-2.0.1\compiler
    npm ERR! node -v v0.10.34
    npm ERR! npm -v 1.4.28
    npm ERR! code ELIFECYCLE
    npm ERR! not ok code 0


    如果不编译的话,怎么个用法?
    ariesjia
    ariesjia
    Jan 24, 2015
    10
    @coolicer 本地生成的
    ariesjia
    ariesjia
    Jan 24, 2015
    11
    你的意思是 不用自定义tag么? 可以的啊 他还是可以的
    icylogic
    icylogic
    Jan 25, 2015 via Android
    12
    我其实不喜欢这种把内容样式逻辑又混到一起的。。
    coolicer
    coolicer
    OP
    Jan 25, 2015
    13
    @icylogic 组件的意思吧,所有东西都在,不用引用这块引用那块。
    tamamaxox
    tamamaxox
    Jan 27, 2015
    14
    这个明明就不是UI库嘛,还好走进来看看
    tamamaxox
    tamamaxox
    Jan 27, 2015
    15
    这个东西的编译跟react不是同一回事啊,react是直接把tag编译成js语句,这个只是字符串。
    coolicer
    coolicer
    OP
    Jan 27, 2015
    16
    @tamamaxox 我都没用过,不过看样子todo.js也是编译出来的,你再看看。
    tamamaxox
    tamamaxox
    Jan 27, 2015
    17
    @coolicer 是编译出来,但是只是把tag做成字符串模版。然后在运行环境才对这个模版解析
    而react是编译成创建dom的语句。
    wmzsonic
    wmzsonic
    Mar 16, 2015
    18
    我一直在关注,感觉挺不错,但是文档不够丰满
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2160 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 13:30 · PVG 21:30 · LAX 05:30 · JFK 08:30
    ♥ Do have faith in what you're doing.