See #17798
props: copyWithSet(element.props, path, value),
      };
      forceUpdate(internalInstance._instance);
    }
  }
  function setInState(id: number, path: Array<string | number>, value: any) {
    const internalInstance = idToInternalInstanceMap.get(id);
    if (internalInstance != null) {
      const publicInstance = internalInstance._instance;
      if (publicInstance != null) {
        setIn(publicInstance.state, path, value);
        forceUpdate(publicInstance);
      }
    }
  }
  function setInContext(id: number, path: Array<string | number>, value: any) {
    const internalInstance = idToInternalInstanceMap.get(id);
    if (internalInstance != null) {
      const publicInstance = internalInstance._instance;
      if (publicInstance != null) {
        setIn(publicInstance.context, path, value);
        forceUpdate(publicInstance);
      }
    }
  }
  function setIn(obj: Object, path: Array<string | number>, value: any) {
    const last = path.pop();
    const parent = path.reduce(
      
      (reduced, attr) => (reduced ? reduced[attr] : null),