apps/meteor/client/uikit/hooks/useUiKitView.ts
Function useUiKitView
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function useUiKitView<S extends UiKit.View>(initialView: S): UseUiKitViewReturnType<S> {
const [errors, setErrors] = useSafely(useState<{ [field: string]: string }[] | undefined>());
const [values, updateValues] = useSafely(useReducer(reduceValues, initialView.blocks, extractInitialStateFromLayout));
const [view, updateView] = useSafely(useState(initialView));
const actionManager = useUiKitActionManager();