Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
atellmer committed Apr 14, 2023
1 parent 9ea6562 commit 9d81d86
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
2 changes: 1 addition & 1 deletion packages/platform-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ import { hydrateRoot } from '@dark-engine/platform-browser';

import { App } from './app';

hydrateRoot(document.getElementById('root'), <App />); // some magic and app works!
hydrateRoot(document.getElementById('root'), <App />);
```

### RenderToStream
Expand Down
29 changes: 0 additions & 29 deletions packages/platform-server/src/render/render.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,35 +98,6 @@ describe('[SSR]', () => {
expect(app).toBe(replacer);
});

test('can render to string async correctly', async () => {
const content = (x: number) =>
dom`
<div class="app">
<div>Hello World</div>
<div>count: ${x}</div>
<button class="button">increment</button>
</div>
`;

const App = component(() => {
const [count, setCount] = useState(0);

return (
<>
<div class='app'>
<div>Hello World</div>
<div>count: {count}</div>
<button class='button' onClick={() => setCount(count + 1)}>
increment
</button>
</div>
</>
);
});

expect(await renderToString(App())).toBe(content(0));
});

test('can render to stream correctly', () => {
const content = (x: number) =>
dom`
Expand Down

0 comments on commit 9d81d86

Please sign in to comment.