Skip to content

Commit d2431f9

Browse files
authored
docs: update react sdk readme (#175)
1 parent 3891796 commit d2431f9

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

packages/react/README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ yarn add @cloudinary/url-gen @cloudinary/react --save
4545
```javascript
4646
import React from 'react';
4747
import { AdvancedImage } from '@cloudinary/react'
48-
import {CloudinaryImage} from '@cloudinary/url-gen';
48+
import { Cloudinary } from '@cloudinary/url-gen';
4949
```
5050

5151
### Transform and Optimize Assets
@@ -55,10 +55,15 @@ import {CloudinaryImage} from '@cloudinary/url-gen';
5555
import React, { Component } from 'react'
5656

5757
import { AdvancedImage } from '@cloudinary/react'
58-
import {CloudinaryImage} from '@cloudinary/url-gen';
58+
import { Cloudinary } from '@cloudinary/url-gen';
5959

60-
const myCld = new Cloudinary({ cloudName: 'demo'});
61-
let img = myCld().image('sample');
60+
const myCld = new Cloudinary({
61+
cloud: {
62+
cloudName: "demo",
63+
},
64+
});
65+
66+
let img = myCld.image('sample');
6267

6368
const App = () => {
6469
return <AdvancedImage cldImg={img}/>
@@ -87,7 +92,7 @@ import {
8792
cloudinaryImage = new CloudinaryImage("sample", { cloudName: "demo" });
8893

8994
const App = () => {
90-
return <AdvancedImage cldImg={img} plugins = {[lazyload(),responsive(), accessibility(), placeholder()]};/>
95+
return <AdvancedImage cldImg={img} plugins={[lazyload(),responsive(), accessibility(), placeholder()]} />;
9196
};
9297
```
9398

0 commit comments

Comments
 (0)