RocketChat/Rocket.Chat

View on GitHub
apps/meteor/client/uikit/hooks/useUiKitView.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function useUiKitView has 30 lines of code (exceeds 25 allowed). Consider refactoring.
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();
Severity: Minor
Found in apps/meteor/client/uikit/hooks/useUiKitView.ts - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status