How can I give require() a variable as a parameter ? (React-Native)

前端 未结 0 1843
囚心锁ツ
囚心锁ツ 2021-01-22 00:15

I am trying this

var track = \'../resources/\'
track += happy_songs.melodies[i]
var song = require (`${track}`)

But it\'s not working giving me t

相关标签:
回答
  • 消灭零回复
提交回复
热议问题