20 lines
596 B
JavaScript
20 lines
596 B
JavaScript
// Metro module 5434 (f5435).
|
|
import { useCallback, useState } from "react";
|
|
import { useRecyclerViewContext } from "./Module5435";
|
|
export function useLayoutState(a0) {
|
|
const [state, setState] = useState(a0);
|
|
const recyclerViewContext = useRecyclerViewContext();
|
|
return [state, useCallback((c25454_0, a1) => {
|
|
setState((prevState) => {
|
|
let r4 = c25454_0;
|
|
if (typeof r4 === "function") {
|
|
r4 = c25454_0(prevState);
|
|
}
|
|
return r4;
|
|
});
|
|
if (!a1 && recyclerViewContext != null) {
|
|
recyclerViewContext.layout();
|
|
}
|
|
}, [recyclerViewContext])];
|
|
}
|