Skip to content

Commit 92e0149

Browse files
mesaugatkamilogorek
authored andcommitted
Use Sentry.init instead of init
`init` is a very common name and has to be looked upon to figure out what it is actually initializing. Using `Sentry.init` removes the confusion. The official docs does the same. https://docs.sentry.io/error-reporting/quickstart/?platform=browser#configure-the-sdk
1 parent c9d6fc6 commit 92e0149

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/browser/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@
2222

2323
## Usage
2424

25-
To use this SDK, call `init(options)` as early as possible after loading the page. This will initialize the SDK and hook
25+
To use this SDK, call `Sentry.init(options)` as early as possible after loading the page. This will initialize the SDK and hook
2626
into the environment. Note that you can turn off almost all side effects using the respective options.
2727

2828
```javascript
29-
import { init } from '@sentry/browser';
29+
import * as Sentry from '@sentry/browser';
3030

31-
init({
31+
Sentry.init({
3232
dsn: '__DSN__',
3333
// ...
3434
});
3535
```
3636

3737
To set context information or send manual events, use the exported functions of `@sentry/browser`. Note that these
38-
functions will not perform any action before you have called `init()`:
38+
functions will not perform any action before you have called `Sentry.init()`:
3939

4040
```javascript
4141
import * as Sentry from '@sentry/browser';

0 commit comments

Comments
 (0)