Skip to content
Snippets Groups Projects
Commit e749d694 authored by Olivier ABDELNOUR's avatar Olivier ABDELNOUR
Browse files

wip

parent ee368aea
No related branches found
No related tags found
No related merge requests found
Pipeline #60120 passed
......@@ -43,3 +43,53 @@ After this chapter, thanks to the _ES modules_, there will be no more imported f
- Remove the _IIFE_
- Write an `export` statement to export the component's function.
- Write an `import` statement to import the `parseUrl` function if required.
??? note "Show the resulting files"
=== "welcome.js"
```js linenums="1"
export function WelcomeComponent() {}
/* method WelcomeComponent.init */
WelcomeComponent.prototype.init = function init() {
// ...
};
// ...
```
=== "game.js"
```js linenums="1"
import { parseUrl } from "./utils";
var environment = {
api: {
host: "http://localhost:8081",
},
};
export function GameComponent() {
// ...
}
/* method GameComponent.init */
GameComponent.prototype.init = function init() {
// ...
};
// ...
```
=== "score.js"
```js linenums="1"
import { parseUrl } from "./utils";
export function ScoreComponent() {
// ...
}
// ...
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment