function useLocalModel(spec) {
    const [ret] = useState(() => {
        if (!spec) return null;
        return spec.isHoistModel ? new spec() : spec.call();
    });
    useOwnedModelLinker(ret);
    return ret;
}
/**
 * Create a new model that will be maintained for lifetime of component and destroyed
 * when component is unmounted.
 *
 * @param {(Class|function)} [spec] - class of HoistModel to create, or a function to call to generate one.
 */
Create a new model that will be maintained for lifetime of component and destroyed
when component is unmounted.

@param {(Class|function)} [spec] - class of HoistModel to create, or a function to call to generate one.
Create a new model that will be maintained for lifetime of component and destroyed when component is unmounted . @param { ( Class|function ) } [ spec ] - class of HoistModel to create or a function to call to generate one .
function useLocalModel(spec) {
    const [ret] = useState(() => {
        if (!spec) return null;
        return spec.isHoistModel ? new spec() : spec.call();
    });
    useOwnedModelLinker(ret);
    return ret;
}
function useLocalModel ( spec ) { const [ ret ] = useState ( ( ) => { if ( ! spec ) return null ; return spec . isHoistModel ? new spec ( ) : spec . call ( ) ; } ) ; useOwnedModelLinker ( ret ) ; return ret ; }
Create a new model that will be maintained for lifetime of component and destroyed
 when component is unmounted.
Create a new model that will be maintained for lifetime of component and destroyed when component is unmounted .