fkhadra / fkhadra/react-toastify

Incorrect example on documentation: transition={Bounce} causes “Bounce is not defined” error

Open
#1,272 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
13.4k
Forks
741
PR merge metrics
No merged PRs in 30d

Description

**Do you want to request a feature or report a bug?**

Bug

**What is the current behavior?**

In the official React-Toastify documentation (Home → The Playground → Toast Container example), the following snippet is shown:

```

```

**This results in the following browser error:**

Uncaught ReferenceError: Bounce is not defined
Because Bounce is not imported or defined in the example.

**If the current behavior is a bug, please provide the steps to reproduce the bug.**

1. Copy the example from the documentation under The Playground → Toast Container.
2. Paste it in any React project.
3. Run the project.
4. Browser throws error: Bounce is not defined.

**What is the expected behavior?**

The docs should show either:

Option 1 — With import
```
`import { Bounce } from "react-toastify";`

```

Option 2 — Using string value (works without import)
``

Either of these prevents the “Bounce is not defined” error.

**Which versions of React, and which browser/OS are affected?**

All browsers and React versions are affected when copying the example exactly as shown.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.