flexbox’s “justify-content:center” doesn’t do text-align
It only aligh the “items” to the center axis. Text inside each item is not aligned in center Here is an example provided by w3schools . You can see “1” is not in the center of the pink box.
It only aligh the “items” to the center axis. Text inside each item is not aligned in center Here is an example provided by w3schools . You can see “1” is not in the center of the pink box.
Where to put the data fetching code? componentWillMount() ? Not any more. It’s been deprecated. You have no choice but put it inside componentDidMount() , which is recomendded by React. However ther is a big issue. componentDidMount() is actually AFTER render(). It "works" because after componentDidMount() finishes its job and changes some state, render() will …
Load data from backend before rendering a React component – best practice Read More »