diff --git a/spec/tests/Iterate.spec.tsx b/spec/tests/Iterate.spec.tsx index dce5d6b..ba87325 100644 --- a/spec/tests/Iterate.spec.tsx +++ b/spec/tests/Iterate.spec.tsx @@ -1,7 +1,7 @@ import { it, describe, expect, afterEach, vi } from 'vitest'; import { gray } from 'colorette'; import { render, cleanup as cleanupMountedReactTrees, act } from '@testing-library/react'; -import { Iterate, type IterationResult } from '../../src/index.js'; +import { Iterate, It, type IterationResult } from '../../src/index.js'; import { IterableChannelTestHelper } from '../utils/IterableChannelTestHelper.js'; afterEach(() => { @@ -9,6 +9,10 @@ afterEach(() => { }); describe('`Iterate` component', () => { + it(gray('Importable also as ``'), () => { + expect(Iterate).toStrictEqual(It); + }); + it( gray( 'When used in the no-render-function form and given an iterable that yields a value will render correctly' diff --git a/src/Iterate/index.tsx b/src/Iterate/index.tsx index 887332b..0ef1d15 100644 --- a/src/Iterate/index.tsx +++ b/src/Iterate/index.tsx @@ -4,8 +4,8 @@ import { useAsyncIter, type IterationResult } from '../useAsyncIter/index.js'; export { Iterate, type IterateProps }; /** - * The `` helper component is used to format and render an async iterable (or a plain non-iterable value) - * directly onto a piece of UI. + * The `` helper component (importable also as ``) is used to format and render an async iterable + * (or a plain non-iterable value) directly onto a piece of UI. * * Essentially wraps a single {@link useAsyncIter `useAsyncIter`} hook call into a component * conveniently. diff --git a/src/index.ts b/src/index.ts index 74fd11d..cabf622 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,6 +7,7 @@ export { useAsyncIter, type IterationResult, Iterate, + Iterate as It, type IterateProps, iterateFormatted, type FixedRefFormattedIterable,