Skip to content

Commit

Permalink
fix(docs): fix links to CDNs
Browse files Browse the repository at this point in the history
  • Loading branch information
hatemhosny committed Sep 4, 2024
1 parent 37dd275 commit 4150510
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions docs/docs/features/module-resolution.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@ This is made possible by using [import maps](https://github.com/WICG/import-maps

<p>&nbsp;</p>

You can import React like that:
You can import from React like that:

```js
import React, { useState } from 'react';
import { createRoot } from 'react-dom/client';
import { useState } from 'react';
```

Demo:
Expand Down Expand Up @@ -169,8 +168,7 @@ By default, npm modules are imported from [esm.sh](https://esm.sh/). You may cho
Example:

```js
import React, { useState } from 'esm.sh:react';
import { createRoot } from 'esm.sh:react-dom/client';
import { useState } from 'esm.sh:react';
```

:::caution
Expand All @@ -182,7 +180,7 @@ Example:
```js
// this will NOT work!
import React, { useState } from 'esm.sh:react'; // React from esm.sh
import { createRoot } from 'react-dom/client'; // React from jspm.dev
import { createRoot } from 'skypack:react-dom/client'; // React from skypack.dev
```

:::
Expand Down

0 comments on commit 4150510

Please sign in to comment.