docs: mention kebab case naming for islands (#572)

This commit is contained in:
Yuki Tanaka
2022-08-08 21:22:58 +00:00
committed by GitHub
parent 5b9ce720d0
commit 0449a4c73a
2 changed files with 7 additions and 5 deletions
+5 -3
View File
@@ -21,9 +21,10 @@ Fresh embraces this model. All pages are rendered server side, but you can
create "island components" that are _also_ rendered client side. To do this,
Fresh projects have a special `islands/` folder. The modules in this folder each
encapsulate a single island component. The name of the module should be the
[pascal case][pascal-case] name of the island component. For example a counter
component would be defined in the file `islands/Counter.tsx`. A buy now button
would be defined in the file `islands/BuyNowButton.tsx`.
[pascal case][pascal-case] or [kebab case][kebab-case] name of the island
component. For example a counter component would be defined in the file
`islands/Counter.tsx`. A buy now button could be defined in the file
`islands/buy-now-button.tsx`.
Here is an example of an island component that counts down to a specific time.
@@ -94,3 +95,4 @@ The page that is rendered on the client now has an interactive countdown.
[islands-architecture]: https://jasonformat.com/islands-architecture
[pascal-case]: https://en.wiktionary.org/wiki/Pascal_case
[kebab-case]: https://en.wiktionary.org/wiki/kebab_case