I am having a problem when I try to concatenate the address of a local image with a value stored in useState.
import React, { useState } from 'react';
import { ImageBackground, ScrollView } from 'react-native';
import { Container, Button, Text } from 'native-base';
import styles from './DescobertaGravidezStyle';
import Header from '../../../components/principalComponents/header/Header';
export default () => {
const [bg, setBg] = useState('Green');
return (
<Container>
<Header />
<ImageBackground
source={require(`../../../img/bg/bg${bg}.png`)}
style={{ width: '100%', height: '100%' }}
></ImageBackground>
</Container>
);
};