I want to style each div within an element

I want to style each div within my element using ‘& > div’ but it is not working. Can someone please explain? This is my styles object within my class const styles = { container: { display: ‘flex’, flexFlow: ‘column’, }, informationPage: { marginTop: ’70px’, }, grid: { ‘& > div’: { backgroundColor: ‘blue’ },… Read More I want to style each div within an element

ReactJS – Trying to access the title of an object I'm pulling from a webpage online, but getting these errors

I’m trying to create a news website with ReactJS and I’m getting three various warnings/errors when I try to run the page. I can get it to display the article link properly when I don’t include the title. I still get the two first warnings in this case, but when I try to access the… Read More ReactJS – Trying to access the title of an object I'm pulling from a webpage online, but getting these errors

Function in react component is "undefined" in JSX though "this" is bound

I have a function that’s returning JSX, a set of Radio inputs which are using another function to change the state. I’m dynamically returning this function with a switch statement in another function, that then it is being rendered. The function being used in the onChange in the getCarSizeQ() undefined. handleRadioButton = (value) => {… Read More Function in react component is "undefined" in JSX though "this" is bound

How to Use Unicode While Array Map in JSX REACT?

const data = ["1","2","3","4","5","6"] // example data const unicode = &bull; // This is the unicode that I want to put in the jsx <div> { data.map((item)=>( item + <span>unicode</span> )) } </div> But doesn’t work it displays [object Object] I Tried (&bull;) , {"&bull;"}, <span>&bull;</span>, <span>{"&bull;"}</span> but none of them worked. Any idea how… Read More How to Use Unicode While Array Map in JSX REACT?

useState and useEffect not playing nice with an API call

const [inputText, setInputText] = useState(”); const [searchTerm, setSearchTerm] = useState(”); const [data, setData] = useState(null); const handleChange = (event) => { setInputText(event.target.value); }; const handleSubmit = (event) => { event.preventDefault(); setSearchTerm(inputText) console.log(inputText) setInputText(”) }; useEffect(() => { if (searchTerm) { console.log(‘starting fetch with -> ‘, `https://imdb-api.com/en/API/SearchTitle/k_ix11kdvq/${searchTerm}`) fetch(`https://imdb-api.com/en/API/SearchTitle/k_ix11kdvq/${searchTerm}`) .then(res => { res.json() console.log(‘json data’) }) .then(json… Read More useState and useEffect not playing nice with an API call