I thought the line:
import { FETCH_WEATHER } from "../actions/index";
means: we don't import the whole object, but import the obj.FETCH_WEATHER from the file ../actions/index.js
One example is, we use
import React, { Component } from "react";
And it is like, we import from "react", let's call it here as obj, and name it React in our own file, and obj.Component, we name it as Component in our own file.
(1) is that true?
(2) in the file ../actions/index.js, the content is actually:
export const FETCH_WEATHER = "FETCH_WEATHER";
so there is no object, and no key / value pair to speak of. So what does import { FETCH_WEATHER } mean?