Skip to content

Commit

Permalink
remove renderToRenderStream
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas committed Dec 3, 2024
1 parent fab8705 commit 04c222d
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 173 deletions.
22 changes: 0 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,6 @@ test('iterate through renders with DOM snapshots', async () => {
})
```

### `renderToRenderStream` as a shortcut for `createRenderStream` and calling `render`

In every place you would call

```js
const {takeRender, render} = createRenderStream(options)
const utils = await render(<Component />, options)
```

you can also call

```js
const renderStream = renderToRenderStream(<Component />, combinedOptions)
// if required
const utils = await renderStream.renderResultPromise
```

This might be shorter (especially in cases where you don't need to access
`utils`), but keep in mind that the render is executed **asynchronously** after
calling `renderToRenderStream`, and that you need to `await renderResultPromise`
if you need access to `utils` as returned by `render`.

### `renderHookToSnapshotStream`

Usage is very similar to RTL's `renderHook`, but you get a `snapshotStream`
Expand Down
94 changes: 0 additions & 94 deletions src/__tests__/renderToRenderStream.test.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/pure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ export {useTrackRenders} from './renderStream/useTrackRenders.js'

export type {SyncScreen} from './renderStream/Render.js'

export {renderToRenderStream} from './renderToRenderStream.js'
export type {RenderStreamWithRenderResult} from './renderToRenderStream.js'
export {renderHookToSnapshotStream} from './renderHookToSnapshotStream.js'
export type {SnapshotStream} from './renderHookToSnapshotStream.js'

Expand Down
55 changes: 0 additions & 55 deletions src/renderToRenderStream.ts

This file was deleted.

0 comments on commit 04c222d

Please sign in to comment.