August 2017
Beginner
298 pages
7h 4m
English
We have the geolocation. So, let's start creating the custom element. Currently, your folder structure will be as follows:
.├── index.html├── package.json├── src│ ├── css│ │ └── styles.css│ └── js│ └── home.js└── webpack.config.js
We want to keep our custom element to be independent of other JavaScript modules. Inside the src/js directory, create a file under the path CustomElements/Weather/Weather.js. Do note that I have used capital letters for the first letters in the folder and filenames (PascalCase). You can use PascalCase for files and folders, which will export an entire class. This is only for easily identifying classes in your project folder and need not be a strictly followed rule.
Now, your folder ...
Read now
Unlock full access