// assets/icons.jsexport{defaultasimageEditIcon}from'./edit.png';// index.js// With item.icon = editIcon…<Imagesource={ImageLibrary.imageEditIcon}/>
...
You are using something called a computed key for an object, by taking advantage of template strings to interpolate the value into the string. With interpolation and writing it statically it would be the same as ImageLibrary['imageEditIcon'] which retrieves the value for ImageLibrary.imageEditIcon
Seems like a small syntax error:
In an example this translates to:
You are using something called a computed key for an object, by taking advantage of template strings to interpolate the value into the string. With interpolation and writing it statically it would be the same as
ImageLibrary['imageEditIcon']
which retrieves the value forImageLibrary.imageEditIcon
i'm really sorry... it was my fault.. that's exactly what i'm trying to do. Thanks a lot!