There is a part of the component code

const format = require('../../infra/client/utils/format') const truncate = require('lodash.truncate') let flag = true module.exports = AppHeader function AppHeader (props) { console.log(props) const { user, navigateTo, logout, assign, isSubmenuVisible, refresh, isNotRenderedYet } = props if (!user) { return } if(flag) { flag = false refresh(user) } 

state should be controlled by redox, how to transfer flag variable to application state?

  • I do not know the whole picture, so I can only say that if you think that the value of this variable is a place in the application state, then announce it there. - user220409
  • Create a reducer that will change the state of the flag; by default, set it to false. In the component get this state in the form of a props (props.flag) - Alex Slobodyansky

0