Skip to content

Commit

Permalink
do not suggest ReactDOM.render(..., document.body) as it's anti pat…
Browse files Browse the repository at this point in the history
…tern!
  • Loading branch information
dimaMachina committed Feb 27, 2023
1 parent 2c4452d commit 247a5d8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/graphiql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,9 @@ import ReactDOM from 'react-dom';

import 'graphiql/graphiql.css';

const fetcher = createGraphiQLFetcher({
url: 'https://my.backend/graphql',
});
const fetcher = createGraphiQLFetcher({ url: 'https://my.backend/graphql' });

ReactDOM.render(<GraphiQL fetcher={fetcher} />, document.body);
ReactDOM.render(<GraphiQL fetcher={fetcher} />, document.getElementById('root'));
```

### Using as UMD bundle over CDN (Unpkg, JSDelivr, etc)
Expand Down

0 comments on commit 247a5d8

Please sign in to comment.