Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tắt các thông báo về state, action trong console khi build ra public #6

Open
namthang opened this issue May 16, 2016 · 2 comments

Comments

@namthang
Copy link

Hi Tùng.
Khi mình npm run build để chạy thật demo cho xếp thì trong console vẫn hiển thị các state, action.
Làm sao để tắt các thông báo này đi được nhỉ.
Thanks Tùng

@thanhtungdp
Copy link
Owner

BẠn chỉnh trong file app/redux/configureStore.js nha
Bỏ loggerMiddleware trong đoạn này

            applyMiddleware(thunkMiddleware, loggerMiddleware),

Full code

import {createStore, applyMiddleware, compose} from 'redux';
import rootReducers from '../reducers/index';
import thunkMiddleware from 'redux-thunk';
import createLogger from 'redux-logger';

const loggerMiddleware = createLogger();

export default function configureStore(initialState) {
    return createStore(
        rootReducers,
        initialState,
        compose(
            applyMiddleware(thunkMiddleware, loggerMiddleware),
            window.devToolsExtension ? window.devToolsExtension() : f => f
        )
    )
}

@binhnq94
Copy link

@thanhtungdp ok tung 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants