byte-fe / react-model

The next generation state management library for React
235 stars 22 forks source link

[RFC] Disable logs from specific type of actions #155

Closed kyleslight closed 4 years ago

kyleslight commented 4 years ago

To prevent logs triggered by some specific type of actions which may be disturbing in console

import { middlewares } from 'react-model'

middlewares.config.logger.enable = ({modelName, actionName}) => ['aaa'].indexOf(actionName) !== -1