Skip to content

Commit

Permalink
Use ref callback for render callback in React 18
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Jun 21, 2023
1 parent b5a6869 commit 0da98d1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/react-components/chat-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ function renderChatMessage(body, from, allowEmojiRender) {

const EntryDom = ({ callback }) => (
<div
// callback is passed in here as part of React 18 createRoot method.
// eslint-disable-next-line react/no-unknown-property
callback={callback}
ref={callback}
className={classNames({
[styles.presenceLogEntry]: !isEmoji,
[styles.presenceLogEntryOneLine]: !isEmoji && !multiline,
Expand Down

0 comments on commit 0da98d1

Please sign in to comment.