美文网首页
Rest接口组件的命名

Rest接口组件的命名

作者: 方健 | 来源:发表于2017-01-04 10:53 被阅读22次

    表示约定

    A:[B]  表示A组件包含B组件
    A:[B C] 表示A组件包含B组件和C组件
    

    命名约定

    ComponentR:[Component:[ComponentV]]
    

    其中 ComponentR 为Restful接口的组件,例如

    <BrowserR url="/items"/>
    

    Component 为使用function接口的组件,例如

    <Browser fetchItems={fetchItems}/>
    

    Browser V为接受数据,用于显示的组件,例如

    <BrowserV items={items}/>
    

    相关文章

      网友评论

          本文标题:Rest接口组件的命名

          本文链接:https://www.haomeiwen.com/subject/tnjovttx.html