noNewInUseMemoAvoid creating '{{constructorName}}' with `new` inside useMemo. Create it outside the memo callback or use an effect/ref pattern.small-rules/no-new-instance-in-use-memoDisallow configured constructor calls (default: new Instance) inside React useMemo callbacks.
noNewInUseMemoAvoid creating '{{constructorName}}' with `new` inside useMemo. Create it outside the memo callback or use an effect/ref pattern.This rule accepts one options object after the severity.
import { useMemo } from "@rbxts/react";
const model = useMemo(() => { return new Instance("Model");}, []);function useMemo(factory) { return factory();}
const model = useMemo(() => new Instance("Model"), []);