Skip to content

Comments

React Weather Data Submission#7

Open
wesleyfrankel wants to merge 2 commits intoprojectshft:mainfrom
wesleyfrankel:main
Open

React Weather Data Submission#7
wesleyfrankel wants to merge 2 commits intoprojectshft:mainfrom
wesleyfrankel:main

Conversation

@wesleyfrankel
Copy link

No description provided.

export const fetchData = createAsyncThunk(
'city/get',
async(cityName) => {
let url = 'https://api.openweathermap.org/data/2.5/forecast?q=' + cityName + '&appid=75f4785546ba2c0a068da88d46e4db01'
Copy link

Choose a reason for hiding this comment

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

would be a good idea to have appid as a variable because this is a value that could change

dataType: 'json'
});
const data = await response.json();
return data
Copy link

Choose a reason for hiding this comment

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

missing semi-colon

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