Skip to content

Commit

Permalink
Update content/docs/integrating-with-other-libraries.md
Browse files Browse the repository at this point in the history
Co-Authored-By: vvscode <v.vanchuk@tut.by>
  • Loading branch information
another-guy and vvscode committed Feb 22, 2019
1 parent 1db5c91 commit 187b668
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/docs/integrating-with-other-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class SomePlugin extends React.Component {
}
```

Заметьте, что мы объявили два [метода жизненного цикла](/docs/react-component.html#the-component-lifecycle) — как `componentDidMount`, так и `componentWillUnmount`. Многие jQuery-плагины добавляют обработчики событий DOM, поэтому важно отключать их внутри `componentWillUnmount`. Если плагин не предоставляет метод для очистки, то, возможно, вам придётся написать свой. Помните об удалении обработчиков событий, добавленных плагином, чтобы избежать утечек памяти.
Заметьте, что мы объявили два [метода жизненного цикла](/docs/react-component.html#the-component-lifecycle) — как `componentDidMount`, так и `componentWillUnmount`. Многие jQuery-плагины добавляют обработчики событий DOM, поэтому важно удалять их внутри `componentWillUnmount`. Если плагин не предоставляет метод для очистки, то, возможно, вам придётся написать свой. Помните об удалении обработчиков событий, добавленных плагином, чтобы избежать утечек памяти.

### Интеграция с jQuery-плагином Chosen {#integrating-with-jquery-chosen-plugin}

Expand Down

0 comments on commit 187b668

Please sign in to comment.