-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Feat rsc #6516
Closed
Closed
Feat rsc #6516
Changes from 8 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
0f78209
refactor: improve rscServerRegister.ts and test
Coooder-X 464d6bd
refactor: clean code
Coooder-X c54c6d6
fix: pnpm-lock conflict
Coooder-X 6a99167
fix: merge and fix conflicts
Coooder-X 3a0feec
feat: rsc server register surpport tsx
Coooder-X 90698b7
refactor: change file name
Coooder-X 7f8902f
fix: revert pnpm-lock.yaml
Coooder-X cb65a27
fix: pnpm-lock.yaml
Coooder-X 5e9a88e
test: add rsc code transform test
Coooder-X 19c530d
fix: rsc code transform case: component has private function
Coooder-X 63af685
fix: add rsc code transform case and fix bugs
Coooder-X c90c6ee
fix: conflicts
Coooder-X a8a18eb
feat: rsc refresh (#6532)
chenjun1011 f4a49d2
fix: test case
Coooder-X cddbe88
Merge branch 'feat-rsc' of github.com:alibaba/ice into feat-rsc
Coooder-X 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use server'; | ||
|
||
import EditButton from '@/components/EditButton'; | ||
import Counter from '@/components/Counter'; | ||
import InnerServer from '@/components/Content'; | ||
|
||
export default function Container() { | ||
return ( | ||
<> | ||
<Counter> | ||
<InnerServer /> | ||
</Counter> | ||
<EditButton noteId="editButton"> | ||
hello world | ||
</EditButton> | ||
<div> {serverPrint('serverPrint call')} </div> | ||
</> | ||
); | ||
} | ||
|
||
export function serverPrint(sentence) { | ||
return sentence; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use server'; | ||
|
||
export default function InnerServer() { | ||
return ( | ||
<div> | ||
inner server | ||
</div> | ||
); | ||
} |
This file contains 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,16 @@ | ||
import { useState } from 'react'; | ||
import styles from './index.module.css'; | ||
import Container from '@/components/Container'; | ||
// import Comments from '@/components/Comments'; | ||
// import Footer from '@/components/Footer'; | ||
import EditButton from '@/components/EditButton.client'; | ||
import Counter from '@/components/Counter.client'; | ||
|
||
export default function Home() { | ||
console.log('Render: Index'); | ||
|
||
return ( | ||
<div> | ||
<h2>Home Page</h2> | ||
<Counter /> | ||
<EditButton noteId="editButton"> | ||
hello world | ||
</EditButton> | ||
<Container /> | ||
</div> | ||
); | ||
} |
This file contains 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 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 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.
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.
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.
use server 应该是用来标志 server action 的,组件默认情况下就是 server component