Can I use import syntax instead of require as suggested by react native docs
I assume both are same. If not why? Will that improve the performance of loading images?
Can I use import syntax instead of require as suggested by react native docs
I assume both are same. If not why? Will that improve the performance of loading images?
Yes, the latest React Native tutorials use the new import syntax. The main difference is, import is ECMAScript 6(ES6) syntax and require is ECMAScript 5(ES5).
yes you can use import. require
is old syntax and import is new one introduced in ES6.