I am learning React native and simply want to add an image inside of a container.View and a title.Text. Nothing is being shown. I tried both accessing it from the assets folder and via uri.
My assets folder is outside of the components folder.
import React, { useState, useEffect } from 'react'
import styled from 'styled-components/native'
import { Text, Image, View } from 'react-native'
import { MAGIC_API } from './reusable/urls';
export const MagicAnswerList = () => {
const [magicAnswer, setMagicAnswer] = useState([])
useEffect(() => {
fetch(MAGIC_API)
.then(res => res.json())
.then(magicdata => setMagicAnswer(magicdata))
.catch(err => console.error(err))
}, [])
return (
<Container>
<Title>
{magicAnswer.Answer}
<MagicBall
source={require('../assets/billiard.png')}
/>
</Title>
</Container>
)
}