+ autocomplete + thunk
This commit is contained in:
12
src/reducers/autoComplete.js
Normal file
12
src/reducers/autoComplete.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const autoCompleteReducer = (state = [], action) => {
|
||||
switch (action.type) {
|
||||
case "AUTOCOMPLETE_ADD":
|
||||
return action.payload;
|
||||
case "AUTOCOMPLETE_CLEAR":
|
||||
return (state = []);
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
||||
|
||||
export default autoCompleteReducer;
|
||||
Reference in New Issue
Block a user