appbaseio/dejaVu

View on GitHub
packages/browser/src/reducers/query.js

Summary

Maintainability
A
0 mins
Test Coverage
import { QUERY } from '../actions/constants';

const queryReducer = (state = {}, action) => {
    const { query } = action;
    switch (action.type) {
        case QUERY.SET_QUERY:
            return query;
        default:
            return state;
    }
};

const getQuery = state => state.query;

export { getQuery };

export default queryReducer;