import { createAction } from 'redux-actions';
import backend from '../service/backend.js';


export default createAction(
  'GET_CARDATA',
   async (searchQuery) => await backend.getCarData(searchQuery)
);

import { createAction } from 'redux-actions';
import backend from '../service/backend.js';


export default createAction(
  'GET_CARDATA',
  async (searchQuery) => await backend.getCarData(searchQuery)
);

Edit file to include async actions instead of sync actions