0

Is there a shorthand way to do the following?

import { ACTION, ACTION2, ACTION3 } from './actionTypes';

when actionTypes looks like:

export const ACTION = 'ACTION';
export const ACTION2 = 'ACTION2';
...

I also know I could import it like import * as actionTypes from './actionTypes'; but in my opinion it makes the code less pleasant to look at because the actions use will look like actionTypes.ACTION. The issue is I have a lot of action types now and don't like the look of the super long import statement required to import a lot by name

b.danigan
  • 33
  • 6

0 Answers0