Skip to content

completed base weather app!#57

Open
Mystjerne wants to merge 1 commit intorocketacademy:mainfrom
Mystjerne:dana-base-weather-app
Open

completed base weather app!#57
Mystjerne wants to merge 1 commit intorocketacademy:mainfrom
Mystjerne:dana-base-weather-app

Conversation

@Mystjerne
Copy link
Copy Markdown

No description provided.

Comment thread src/App.jsx
import "./App.css";
import API from "./WeatherAPI";

//The following is an example of class based implementation of React.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How was learning class based components?
You could port the project into a vitejs application if you wanted to.

Comment thread src/App.jsx
if (this.state.formSubmitted === true) {
this.setState({ formSubmitted: false });
}
this.setState({ cityInput: e.target.value });
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use template literals to make your comments easier.

cityInput: ${e.target.value}

Comment thread src/WeatherAPI.jsx

console.log("AAAAAAAAA prop passed down auccessfully", submitted_city);

const handleResponse = (response) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove this function its not really called

Comment thread src/WeatherAPI.jsx
import { React, useState, useEffect } from "react";
import axios from "axios";

export default function API(props) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can come back to add in .env for practice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants