V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
annqlm
V2EX  ›  React

react 的组件套用

  •  1
     
  •   annqlm · 2016-02-04 09:05:13 +08:00 · 2843 次点击
    这是一个创建于 2975 天前的主题,其中的信息可能已经有所发展或是发生改变。

    用开源的妹子 UI,react 框架[http://amazeui.org/react/components/grid],发现套用组件不太明白。
    比如用 bootstrap ,是把 bootstrap 的 html 代码嵌入到自己的 html 中;react 是用 js 写 html,再渲染到某个 dom 中。我要在妹子 UI 的组件套用组件,是怎么做的呢?

    robinlovemaggie
        1
    robinlovemaggie  
       2016-02-04 10:20:23 +08:00
    react 的宗旨不是为了兼容各个大厂 UI 库,而是要革它们的命。所以你不可能看到官方推出 react-xxx UI 的库,有也只能是第三方来做。比如这个 https://github.com/react-bootstrap/react-bootstrap
    hronro
        2
    hronro  
       2016-02-04 11:24:30 +08:00
    楼主的意思是想在自己的组件中使用 amazeui 的组件吗?直接用不就行了。有点没看懂楼主的意思
    dong3580
        3
    dong3580  
       2016-02-04 11:29:15 +08:00
    通俗理解一下, react 是那段组件的 html ,就是你要在这段 html 中套用 bootstrap 样式,类似于拼接代码。
    ljbha007
        4
    ljbha007  
       2016-02-04 11:33:39 +08:00
    这个表达能力我也是无语了
    答案: 直接用
    kenshinhu
        5
    kenshinhu  
       2016-02-04 11:42:49 +08:00
    直接用,不用想这么多
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5323 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 09:16 · PVG 17:16 · LAX 02:16 · JFK 05:16
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.