How to use the mobx-react.PropTypes.arrayOrObservableArrayOf function in mobx-react

To help you get started, we’ve selected a few mobx-react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github satansdeer / gradient-token-tutorial / front / src / TokensPage / TokensList / index.js View on Github external
key={token.index}
              token={token.gradient}
              onClick={() => showModal()}
            />
          ))}
        
      ) : (
        <div>You don't have tokens yet.</div>
      )}
    
  );
};

TokensList.propTypes = {
  gradientTokenStore: PropTypes.shape({
    tokens: MobxPropTypes.arrayOrObservableArrayOf(PropTypes.object)
  }),
  modalStore: PropTypes.shape({
    showModal: PropTypes.func
  })
};

export default inject("gradientTokenStore", "modalStore")(observer(TokensList));
github satansdeer / gradient-token / front / src / TokensPage / TokensList / index.js View on Github external
key={token.index}
              token={token.gradient}
              onClick={() =&gt; showModal()}
            /&gt;
          ))}
        
      ) : (
        <div>You don't have tokens yet.</div>
      )}
    
  );
};

TokensList.propTypes = {
  gradientTokenStore: PropTypes.shape({
    tokens: MobxPropTypes.arrayOrObservableArrayOf(PropTypes.object)
  }),
  modalStore: PropTypes.shape({
    showModal: PropTypes.func
  })
};

export default inject("gradientTokenStore", "modalStore")(observer(TokensList));