Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

responsive news reader #27

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

jay9044
Copy link

@jay9044 jay9044 commented Sep 17, 2018

Challenging project.... I need to work on callbacks

.then(body => {
const topUsaNewsArticles = body.articles
return topUsaNewsArticles.map(article => {
topStoryDiv.innerHTML = "";
Copy link
Contributor

Choose a reason for hiding this comment

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

This might easier to generate using HTML strings

.then(body => {
const topUsaNewsArticles = body.articles
return topUsaNewsArticles.map(article => {
topStoryDiv.innerHTML = "";
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, it would be good to see display logic extracted out to own function so it could re-used later if needed

@dmitrigrabov
Copy link
Contributor

Good work!

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