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

Weather App: Add note about dynamic import() #29464

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MaoShizhong
Copy link
Contributor

Because

Before #28347, the old weather API included icon URLs in the JSON response, so no asset imports would be needed. With VisualCrossing, they don't include any, so you'd have to gather assets (which they provide separately) and import them.

It's a common question in the community about not having to statically import loads of assets individually for dynamic JS. The help typically involves advising about exploring dynamic import(). At this point, learners should be able to make sense of handling async dynamic imports for this project, it just was never previously mentioned so many people have no idea it even exists.

I think it's sensible to mention it and let learners decide what to do with it.

This PR

  • Adds note about dynamic import() function for dynamically loading bundled assets

Issue

N/A

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project curriculum contributing guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

@github-actions github-actions bot added the Content: JavaScript Involves the JavaScript course label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content: JavaScript Involves the JavaScript course
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant