Skip to content

Commit

Permalink
chore: add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
zllkjc committed Mar 3, 2025
1 parent 81191c5 commit b6d80e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// this plugin is use for
// this plugin is use to provide request context to runtime context
import type { RuntimeContext } from '../context';
import type { RuntimePluginFuture } from '../plugin/types';
import type { TSSRContext } from '../types';
Expand Down
4 changes: 3 additions & 1 deletion tests/integration/ssr/fixtures/init/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { type RuntimeContext, useRuntimeContext } from '@modern-js/runtime';

const App = () => {
const { initialData } = useRuntimeContext();
const { initialData, context } = useRuntimeContext();

console.log(context.request.url, '!!!');
return (
<div className="text-center" id="data">
Hello, Modern.js. env name: {(initialData?.name || '') as string}
Expand Down

0 comments on commit b6d80e4

Please sign in to comment.