message: refactor(SplitCol): Rewrite to FunctionComponent
diff: -import React, { Component, createRef, HTMLAttributes } from 'react';
  +import React, { FC, HTMLAttributes, useMemo, useRef } from 'react';
  import { classNames } from '../../lib/classNames';
  export interface SplitColContextProps {
  @@ -26,22 +26,16 @@ export interface SplitColProps extends HTMLAttributes<HTMLDivElement> {
  fixed?: boolean;
  }
  -export class SplitCol extends Component<SplitColProps> {
  - static defaultProps = {
  - animate: false,
  - };
  -
  - baseRef: React.RefObject<HTMLDivElement> = createRef();
  +export const SplitCol: FC<SplitColProps> = (props: SplitColProps) => {
  + const { children, width, maxWidth, minWidth, spaced, animate, fixed, style, ...restProps } = props;
  + const baseRef = useRef<HTMLDivElement>();
  - getContext() {
  + const contextValue = useMemo(() => {
  return {
  - colRef: this.baseRef,
  - animate: this.props.animate,
  + colRef: baseRef,
  + animate,
  };
  - }
  -
  - render() {
  - const { children, width, maxWidth, minWidth, spaced, animate, fixed, style, ...restProps } = this.props;
  + }, [baseRef, animate]);
  return (
  <div
  @@ -52,16 +46,19 @@ export class SplitCol extends Component<SplitColProps> {
  maxWidth: maxWidth,
  minWidth: minWidth,
  }}
  - ref={this.baseRef}
  + ref={baseRef}
  vkuiClass={classNames('SplitCol', {
  'SplitCol--spaced': spaced,
  'SplitCol--fixed': fixed,
  })}
  >
  - <SplitColContext.Provider value={this.getContext()}>
  + <SplitColContext.Provider value={contextValue}>
  {fixed ? <div vkuiClass="SplitCol__fixedInner">{children}</div> : children}
  </SplitColContext.Provider>
  </div>
  );
  - }
  -}
  +};
  +
  +SplitCol.defaultProps = {
  + animate: false,
  +};
  