React Native Image Binding

If you can do some adjustment in your json, it is possible

Just keep image name inside json data

  {
    name: "One",
    img: "one"
  },
  {
    name: "Two",
    img: "two"
  },
  {
    name: "Three",
    img: "three"
  }
]

and when you want to render it you can use

import { Images } from '@configuration';

<Card image={Images[item.img]}>
</Card>

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top