Skip to content

Commit

Permalink
SCAL-241097 Fix for liveboard shound not rerender if parent component…
Browse files Browse the repository at this point in the history
… rerenders
  • Loading branch information
adityamittal3107 committed Feb 4, 2025
1 parent facf4a5 commit 6b2c054
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/react/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ const componentFactory = <T extends typeof TsEmbed, U extends EmbedProps, V exte
(props: U, forwardedRef: React.MutableRefObject<InstanceType<T>>) => {
const ref = React.useRef<HTMLDivElement>(null);
const { className, ...embedProps } = props;
const { viewConfig, listeners } = getViewPropsAndListeners<Omit<U, 'className'>, V>(
embedProps,
);
const { viewConfig, listeners } = React.useMemo(() => getViewPropsAndListeners<Omit<U, 'className'>, V>(embedProps),
[embedProps]);

const handleDestroy = (tsEmbed: InstanceType<T>) => {
// do not destroy if it is a preRender component
Expand Down

0 comments on commit 6b2c054

Please sign in to comment.