JSFiddle - React, Tailwind, and code Playground

JavaScript

function NOOP() {
   // nothing
}

function getStore(instance) {
   return (instance.props.store || instance.state.store 
           || instance.context.store || 
           {dispatch: this.props.dispatch, getState: NOOP } 
           )  
}