Problem when use dynamic value with image component react native

前端 未结 2 954
情话喂你
情话喂你 2021-01-26 18:21

I get data from DB and put it into source image, it will be error, but if i put only string it will run ok

Run ok:

2条回答
  •  忘掉有多难
    2021-01-26 19:19

    React Native at the moment doesn't support dynamic require calls, i.e. you have to pass a complete constant string inside your require statement for it to work.

    See this github issue for more details: https://github.com/facebook/react-native/issues/6391

提交回复
热议问题