const CSS = 'color: blue' ; const isDev = process . env . NODE_ENV === 'development' ; /**
 * logger is used to logs Store state changes
 */ const logger = { info ( message ? , ... optionalParams ) { if ( isDev ) { window . console . log ( message , ... optionalParams ) ; } } , logState ( name , state , ... optionalParams ) { if ( isDev ) { window . console . log ( `%cUpdated ${ name } ` , CSS , state , ... optionalParams ) ; } } , error ( err , desc ) { if ( ! isDev ) { return ; } if ( desc ) { window . console . error ( `${ desc }` , err ) ; } else { window . console . error ( err ) ; } } , } ; export default logger ;