I am working on ReactJS and Redux. I have a file named actionTypes.js. In this file, I have the following export statement:
export const REGISTER_USER = 'REGISTER_USER';
Now, I import it in registerReducer.js with the statement:
import {REGISTER_USER} from '../actions/actionTypes';
However, when I use this REGISTER_USER variable in my registerReducer.js file, it gives the following error:
Attempted import error: 'REGISTER_USER' is not exported from '../actions/actionTypes'.
When I only import REGISTER_USER but not use it, then the warning declared but not used is issued. I am unable to understand the problem.
Note: All the paths and variable names are correct. I have verified it many times.