const justFocus = (_, { id, ...props }) =>
  document.getElementById(props.id).focus(props)

const justBlur = (_, id) => document.getElementById(id).blur()

export const focus = (id, { preventScroll } = {}) => [
  justFocus,
  { id, preventScroll },
]

export const blur = (id) => [justBlur, id]

const justFocus = (_, { id, ...props }) =>
  document.getElementById(id).focus(props)

const justBlur = (_, id) => document.getElementById(id).blur()

export const focus = (id, { preventScroll } = {}) => [
  justFocus,
  { id, preventScroll },
]

export const blur = (id) => [justBlur, id]

Fix bug in focus effect accessing null prop
Fix bug in focus effect accessing null prop
