message: fix(plugin-rows): pass pluginProps correctly
diff: @@ -26,7 +26,8 @@ export default function({
  }) {
  const { dispatch } = store
  const state = store.getState()
  - const pluginPropsRef = React.useRef({
  + const pluginProps = React.useMemo(() => {
  + return {
  renderIntoExtendedSettings,
  PrimarySettingsWrapper,
  insert: (options?: { plugin: string; state?: unknown }) =>
  @@ -93,74 +94,17 @@ export default function({
  rows.remove(index + 1)
  })
  }
  - })
  - pluginPropsRef.current = {
  - renderIntoExtendedSettings,
  - PrimarySettingsWrapper,
  - insert: (options?: { plugin: string; state?: unknown }) =>
  - rows.insert(index + 1, options),
  - replace: (options?: { plugin: string; state?: unknown }) => {
  - rows.remove(index)
  - rows.insert(index, options)
  - },
  - remove: () => {
  - rows.remove(index)
  - },
  - mergeWithPrevious: (merge: (statePrevious: unknown) => unknown) => {
  - if (index - 1 < 0) return
  -
  - const current = getDocument(state, row.id)
  -
  - let previous = getDocument(state, rows()[index - 1].id)
  - if (!previous || !current) return
  -
  - if (previous.plugin !== current.plugin) {
  - // check if previous focus plugin is the same type
  - const root = selectors.getFocusTree(state)
  - if (!root) return
  -
  - const previousFocusId = selectors.findPreviousNode(root, row.id)
  - if (!previousFocusId) return
  -
  - previous = getDocument(state, previousFocusId)
  - if (!previous || previous.plugin !== current.plugin) return
  -
  - const merged = merge(previous.state)
  - dispatch(
  - actions.change({
  - id: previousFocusId,
  - state: () => merged
  - })
  - )
  - rows.remove(index)
  - } else {
  - merge(previous.state)
  - setTimeout(() => rows.remove(index - 1))
  - }
  - },
  - mergeWithNext: (merge: (statePrevious: unknown) => unknown) => {
  - if (index + 1 === rows().length) return
  - const current = getDocument(state, row.id)
  - let next = getDocument(state, rows()[index + 1].id)
  - if (!next || !current) return
  - if (next.plugin !== current.plugin) {
  - // check if next focus plugin is the same type
  - const root = selectors.getFocusTree(state)
  - if (!root) return
  -
  - const nextFocusId = selectors.findNextNode(root, row.id)
  - if (!nextFocusId) return
  -
  - // use that plugin for merge
  - next = getDocument(state, nextFocusId)
  - if (!next || next.plugin !== current.plugin) return
  }
  + }, [
  + PrimarySettingsWrapper,
  + dispatch,
  + getDocument,
  + index,
  + renderIntoExtendedSettings,
  + row.id,
  + rows,
  + state
  + ])
  - merge(next.state)
  - setTimeout(() => {
  - rows.remove(index + 1)
  - })
  - }
  - }
  - return row.render(pluginPropsRef)
  + return row.render(pluginProps)
  }
  