Add class names to React root component or change structure

Home / Uncategorized / Add class names to React root component or change structure

Question:
I am trying to use flexbox with a React component but a root div is being inserted. I can’t add class names to the root div (omitted).

I think it could be split out into smaller components but I am not sure how?

This is how the structure is now:

This is how I would like the structure:

Current (trimmed down) App.js code:const Hit = ({hit}) =>

""/

Database name

${hit.price}

const SearchResultContent = () =>


class App extends Component {
render() {
return (




);
}
}

export default App;

The classNames that are not added to the inserted root element.


Answer:

Read more

Leave a Reply

Your email address will not be published. Required fields are marked *