import { useEffect } from 'react';
export function noop() { }
export function last(arr) {
    return arr.length ? arr[arr.length - 1] : null;
}
export function useDestroyOnUnmount(field, model, parent) {
    useEffect(function () { return function () {
        if (typeof field === 'string' && model.destroyOnUnmount) {
            parent.removeChild(field);
            model.dispose();
        }
    }; }, [field, model, parent]);
}
export var isArray = Array.isArray;
