Skip to content

Issues or fixes that can improve the project and comments #1

@idiglove

Description

@idiglove

Fix spelling:
line 72-73

VITE_WEATHER_API_KEY = "Eenter your API key"

line 82-85
- [x] Show weather forcast for a city (current and the next 6 days)

I like what you did on setting up relative paths for imports

import Cities from "@/components/Cities";

console logs shouldnt be left hanging in code especially if unnecessary, it can bloat code and is a synchronous method

console.log("in app", info);

I think personally this is a great way of using state management in a simple way. But usually in a real world project, we use redux/react context, and it scales well for bigger apps. So next time, I recommend you trying that way

setItem: (id, data) => {

In real world projects, we dont need these console logs lying around

console.log("Your current position is:", pos);


console.log("in weather infos", current, daily);

console.log("in useFetchData", JSON.stringify(result, {}, 2));

are we sure that item.value["_embedded"] always has ["city:item"] ? You should check that first

const cityItem = item.value["_embedded"]["city:item"];

line 26-32: this is the reason why you should use state management tools, you're being redundant here with storing in your utils/storage and in the component state

storage.setItem("cityInfo", {

you gotta be careful with misspellings, this is important for product owners and business

<h2 className="cities--text">or selete a location</h2>

what is this empty file for?
https://github.com/amineProjects/weatherApp/blob/9a4870f5b82167303e7e17dcf1b451b28a18ee28/src/components/Cities/CitySelector.jsx

why have an index.js then just to import the other file? Why not use the index.js only?

import CityInfos from "./CityInfos";

these careless misspellings are really not good

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions