1. <small id='fAkl2'></small><noframes id='fAkl2'>

      <tfoot id='fAkl2'></tfoot>

    2. <i id='fAkl2'><tr id='fAkl2'><dt id='fAkl2'><q id='fAkl2'><span id='fAkl2'><b id='fAkl2'><form id='fAkl2'><ins id='fAkl2'></ins><ul id='fAkl2'></ul><sub id='fAkl2'></sub></form><legend id='fAkl2'></legend><bdo id='fAkl2'><pre id='fAkl2'><center id='fAkl2'></center></pre></bdo></b><th id='fAkl2'></th></span></q></dt></tr></i><div id='fAkl2'><tfoot id='fAkl2'></tfoot><dl id='fAkl2'><fieldset id='fAkl2'></fieldset></dl></div>
        • <bdo id='fAkl2'></bdo><ul id='fAkl2'></ul>

        <legend id='fAkl2'><style id='fAkl2'><dir id='fAkl2'><q id='fAkl2'></q></dir></style></legend>
      1. React Native 究竟是什么&lt;&gt;(空)组件

        React Native what exactly is the lt;gt; (empty) component(React Native 究竟是什么lt;gt;(空)组件)
          <bdo id='oyTg9'></bdo><ul id='oyTg9'></ul>
        • <i id='oyTg9'><tr id='oyTg9'><dt id='oyTg9'><q id='oyTg9'><span id='oyTg9'><b id='oyTg9'><form id='oyTg9'><ins id='oyTg9'></ins><ul id='oyTg9'></ul><sub id='oyTg9'></sub></form><legend id='oyTg9'></legend><bdo id='oyTg9'><pre id='oyTg9'><center id='oyTg9'></center></pre></bdo></b><th id='oyTg9'></th></span></q></dt></tr></i><div id='oyTg9'><tfoot id='oyTg9'></tfoot><dl id='oyTg9'><fieldset id='oyTg9'></fieldset></dl></div>
            <tbody id='oyTg9'></tbody>

              <tfoot id='oyTg9'></tfoot>
              <legend id='oyTg9'><style id='oyTg9'><dir id='oyTg9'><q id='oyTg9'></q></dir></style></legend>

              <small id='oyTg9'></small><noframes id='oyTg9'>

                  本文介绍了React Native 究竟是什么&lt;&gt;(空)组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在 React Native 中,您可以将一组组件封装在一个 <View>(或类似的)组件中.您还可以将一组组件封装为 <></>.这些是什么?他们只是转换为基本视图吗?这可能不是一个好的做法,但它不会发出警告,也不会崩溃.

                  In React Native you can encapsulate a set of components in one single <View> (or similar) component. You can also encapsulate a set of components as <> and </>. What are these? Do they just translate to an base View? It's probably not a good practice but it doesn't give a warning and it doesn't crash.

                  推荐答案

                  这是 Fragment 组件的 React 快捷方式.

                  It's the React shortcut for Fragment component.

                  你可以这样写:

                  import React, { Component } from 'react'
                  
                  class Component extends Component {
                    render() {
                      return <> <ComponentA/> <ComponentB/> </>
                    }
                  }
                  

                  或者不用快捷键,导入Fragment组件

                  Or without the shortcut and import Fragment component

                  import React, { Component, Fragment } from 'react'
                  
                  class Component extends Component {
                    render() {
                      return <Fragment> <ComponentA/> <ComponentB/> </Fragment>
                    }
                  }
                  
                  

                  你必须知道,你不能使用任何快捷键或道具.

                  You have to know, you can't use any key or prop with the shortcut syntax.

                  这里是官方文档

                  希望对你有帮助!

                  这篇关于React Native 究竟是什么&lt;&gt;(空)组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Fetch multiple links inside foreach loop(在 foreach 循环中获取多个链接)
                  Backbone Fetch Request is OPTIONS method(Backbone Fetch Request 是 OPTIONS 方法)
                  Fetch API leaks memory in Chrome(Fetch API 在 Chrome 中泄漏内存)
                  How can I download and save a file using the Fetch API? (Node.js)(如何使用 Fetch API 下载和保存文件?(Node.js))
                  Send blob data to node using fetch, multer, express(使用 fetch、multer、express 将 blob 数据发送到节点)
                  Sending a custom User-Agent string along with my headers (fetch)(发送自定义用户代理字符串以及我的标头(获取))

                    • <legend id='sDqZA'><style id='sDqZA'><dir id='sDqZA'><q id='sDqZA'></q></dir></style></legend>

                    • <tfoot id='sDqZA'></tfoot>

                        <bdo id='sDqZA'></bdo><ul id='sDqZA'></ul>

                        <small id='sDqZA'></small><noframes id='sDqZA'>

                      • <i id='sDqZA'><tr id='sDqZA'><dt id='sDqZA'><q id='sDqZA'><span id='sDqZA'><b id='sDqZA'><form id='sDqZA'><ins id='sDqZA'></ins><ul id='sDqZA'></ul><sub id='sDqZA'></sub></form><legend id='sDqZA'></legend><bdo id='sDqZA'><pre id='sDqZA'><center id='sDqZA'></center></pre></bdo></b><th id='sDqZA'></th></span></q></dt></tr></i><div id='sDqZA'><tfoot id='sDqZA'></tfoot><dl id='sDqZA'><fieldset id='sDqZA'></fieldset></dl></div>
                            <tbody id='sDqZA'></tbody>