alibaba/noform

View on GitHub
packages/react/src/hooks/useList.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Function useList has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const useList = (options: IListUIProps): IList & { actions: any } => {
    const optionsRef = useRef<IListUIProps>(options)
    const actionsRef = useRef<any>(options.actions)
    const listDomain = useContext(ListDomain)
    actionsRef.current = actionsRef.current || createListActions()
Severity: Minor
Found in packages/react/src/hooks/useList.ts - About 2 hrs to fix

    There are no issues that match your filters.

    Category
    Status