create-rsc-kit 0.30.21 → 0.30.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/templates.js +11 -0
- package/package.json +1 -1
package/dist/templates.js
CHANGED
|
@@ -696,6 +696,12 @@ ${o.host === 'laravel' || o.backend
|
|
|
696
696
|
: ''}- **Links and redirects are typed**: \`\`<Link href={\`/posts/\${slug}\`}>\`\`, a template
|
|
697
697
|
literal, so a renamed route fails the typecheck. Never build urls by
|
|
698
698
|
concatenation.
|
|
699
|
+
- **Leaving the app is a document load**: \`redirect('https://other.site/…')\` works as
|
|
700
|
+
written.${o.host === 'laravel' || o.backend
|
|
701
|
+
? ` A url your backend owns (an OAuth start that bounces to another site) is named in
|
|
702
|
+
\`rscKit({ backendPaths: ['/gitlab'] })\` and then redirected to as written, no cast; unnamed, the
|
|
703
|
+
router fetches it as a page, the bounce fails, and nothing happens on the tap.`
|
|
704
|
+
: ''}
|
|
699
705
|
- **Metadata is \`export const metadata\`** (or \`generateMetadata\`), never tags in
|
|
700
706
|
a page's markup.
|
|
701
707
|
- **Never edit generated files**: \`.rsc-kit/\`, \`${o.sourceDir}/server-actions.generated.ts\`,
|
|
@@ -816,6 +822,11 @@ error, \`field('title')\` to bind the one field whose value the UI must hold.
|
|
|
816
822
|
In a child component \`useForm()\` returns the same object. There is no
|
|
817
823
|
\`errors\` map, \`fieldState\` or \`useFormStatus\` to reach for.
|
|
818
824
|
|
|
825
|
+
A search box on the page it is on is a GET form whose \`action\` is that page:
|
|
826
|
+
the old results stay on screen until the new ones land, \`pending\` says it is
|
|
827
|
+
working, and Back returns to the query it left. Do not wrap it in your own state
|
|
828
|
+
or a Suspense key.
|
|
829
|
+
|
|
819
830
|
## Data
|
|
820
831
|
|
|
821
832
|
Fetch in a server component and await it. There is no loader and no
|