I have a component which is rendering some values with image id of the s3 bucket. have created one child component which will call to aws server and get image URL. have set loader until API call is in progress. after URL will be received from the call, the loader will stop and an image will be rendered.
Problem: i have some operation on values to be performed. like maintaining values, increment-decrements.
while updating states, a component will be remount. and again image API will be called and loaded.
shouldComponentUpdate
won't work. because if I will use it, it will not display changes on the screen.
have set loader till image loads. but it's not a valid thing to show loader on each button click. looking for some better solution. stuck on the issue from past 12 hours. will be really thankful if someone can help me to get rid of this.
Thank You.