React & Redux - Creating new records

Hi all!

I want to get an understanding from the community on what is the best practice or common way when creating new records (API) using react & redux.

What I have done when playing around with it, is that I have defined one action type, FETCH_TODOS which basically does a call to the API to retrieve all records and then using thunk it uses the dispatch method passing the payload that comes back to the reducer to create the new state object in the store.


export const fetchTodos = () => dispatch => {
  axios.get("http://localhost:4000/todos").then(res =>
      type: FETCH_TODOS,


export default function(state = initialState, action) {
  switch (action.type) {
    case FETCH_TODOS:
      return {
        items: action.payload
      return state;

Now in the action that I have to create new records, my doubt it, do you consider a new action type called NEW_TODO, and then dispatch the action triggering to add this to the state, or do you directly after creating the record, just trigger the FETCH_TODOS again to update the state?


export const createTodo = postData => dispatch => {
    .post("http://localhost:4000/todos", postData)
    .then(res => dispatch(fetchTodos()));

I’m assuming this is probably the most efficient way? Do you think its correct? Shall I just have one more action type in my reducer and introducing the data into the state to prevent one additional request to the API? Apologies if it’s a silly questions, I’m just getting started with Redux and want to make sure i get this right.