# Function withFive

- withFive<F extends FiveInjectionFeature[]>(
  features: F,
  ): <P extends PropTypeOfFiveFeatures<F>, C extends ComponentClass<P, any>>(
  Component: C & ComponentClass<P, any>,
  ) => ForwardRefExoticComponent<
  PropsWithoutRef<Omit<P, "$five">> & RefAttributes<
  Omit<
  InstanceType<C>,
  | "render"
  | "context"
  | "state"
  | "setState"
  | "forceUpdate"
  | "componentDidMount"
  | "shouldComponentUpdate"
  | "componentWillUnmount"
  | "componentDidCatch"
  | "getSnapshotBeforeUpdate"
  | "componentDidUpdate"
  | "componentWillMount"
  | "UNSAFE_componentWillMount"
  | "componentWillReceiveProps"
  | "UNSAFE_componentWillReceiveProps"
  | "componentWillUpdate"
  | "UNSAFE_componentWillUpdate"
  | "props"
  | "refs",
  >,
  >,
  >

  #### Type Parameters

  - F extends FiveInjectionFeature[]

  #### Parameters

  - features: F

  #### Returns <P extends PropTypeOfFiveFeatures<F>, C extends ComponentClass<P, any>>(
  Component: C & ComponentClass<P, any>,
  ) => ForwardRefExoticComponent<
  PropsWithoutRef<Omit<P, "$five">> & RefAttributes<
  Omit<
  InstanceType<C>,
  | "render"
  | "context"
  | "state"
  | "setState"
  | "forceUpdate"
  | "componentDidMount"
  | "shouldComponentUpdate"
  | "componentWillUnmount"
  | "componentDidCatch"
  | "getSnapshotBeforeUpdate"
  | "componentDidUpdate"
  | "componentWillMount"
  | "UNSAFE_componentWillMount"
  | "componentWillReceiveProps"
  | "UNSAFE_componentWillReceiveProps"
  | "componentWillUpdate"
  | "UNSAFE_componentWillUpdate"
  | "props"
  | "refs",
  >,
  >,
  >

  - Defined in lib/react/withFive.ts:558