I am starting a react app which will call server to get data and display different value in browsers. Here is 2 kind of logic structure and which of them is better for react