Use with a local file

前端 未结 10 1050
醉梦人生
醉梦人生 2021-02-01 01:56

The documentation says that the only way to reference a static image is to use require.

But I\'m not sure where does react expect to have those images. The examples don

10条回答
  •  忘掉有多难
    2021-02-01 02:08

    From the UIExplorer sample app:

    Static assets should be required by prefixing with image! and are located in the app bundle.

    enter image description here

    So like this:

    render: function() {
      return (
        
          
          
          
          
        
      );
    }
    

提交回复
热议问题