-
Notifications
You must be signed in to change notification settings - Fork 112
fix(example): use import type for ActivityComponentType to avoid runtime errors #603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ENvironmentSet
merged 7 commits into
daangn:main
from
umsungjun:fix/example-import-type
Aug 16, 2025
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
283ae06
fix(example): use `import type` for `ActivityComponentType` to preven…
umsungjun 831ea39
Merge branch 'main' into fix/example-import-type
ENvironmentSet f6de8d2
fix(example): use import type for ActivityComponentType to avoid runt…
umsungjun fc0c2af
fix(example): use import type for ActivityComponentType to avoid runt…
umsungjun 7b0e804
fix(example): use import type for ActivityComponentType to avoid runt…
umsungjun 1d33854
Remove space
ENvironmentSet 6fa0ffe
Merge branch 'main' into fix/example-import-type
ENvironmentSet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Correct: switch to type-only import prevents ESM runtime errors.
Using
import type { ActivityComponentType }matches its type-only nature and avoids runtime import of a non-existent value in ESM builds. LGTM.To ensure there are no remaining runtime imports of
ActivityComponentTypeelsewhere, run:🏁 Script executed:
Length of output: 115
🏁 Script executed:
Length of output: 53434
🏁 Script executed:
Length of output: 892
Fix required: convert remaining runtime imports of ActivityComponentType to type-only
The type-only import change is correct, but I found remaining runtime imports that include ActivityComponentType alongside value exports — these should be split into a type-only import + a runtime import.
Files to update:
Suggested fixes (examples):
Replace:
import { ActivityComponentType, useStack } from "@stackflow/react";
With:
import type { ActivityComponentType } from "@stackflow/react";
import { useStack } from "@stackflow/react";
Replace:
import { ActivityComponentType, useActivity } from "@stackflow/react";
With:
import type { ActivityComponentType } from "@stackflow/react";
import { useActivity } from "@stackflow/react";
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@umsungjun Would you apply changes to these files too?
PS. I guess it's okay to ignore other comments from coderabbit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ENvironmentSet
It seems that the changes are already applied in the commit, so this might be a Coderabbit error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot find
docs/pages/docs/get-started/getting-state.ko.mdxanddocs/pages/docs/get-started/getting-state.en.mdxare changed in anywhere. Where can I check them?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ENvironmentSet Sorry for the confusion, I misunderstood earlier.
As you pointed out, I’ve updated and committed the changes to both
docs/pages/docs/get-started/getting-state.ko.mdxanddocs/pages/docs/get-started/getting-state.en.mdx.Thanks for pointing it out!