このサイトについて
2022/1/4
JetpackCompose
に似てるReact
やってみたいなーって感じでNext.js
で書き直しています。正月休み短いってば
いやマジでJetpackCompose
やんReact
。CSSがダルい以外で差があんまりない。
@Composable
fun ExpandedText() {
var isExpanded by remember { mutableStateOf(false) }
Column {
Text(text = "Hello")
if (isExpanded) {
Text(text = "World")
}
Button(
onClick = { isExpanded = !isExpanded }
) { Text(text = "Open!") }
}
}
const ExpandedText = () => {
const [isExpanded, setExpanded] = useState(false)
return (
<>
<p>Hello</p>
{
isExpanded && <p>World</p>
}
<Button onClick={()=> setExpanded(!isExpanded)}>
Open!
</Button>
</>
)
}
export default ExpandedText
このサイトについて
普段はAndroidの記事を書いています。
Next.jsの静的書き出し機能(SSG)を使ってこのサイトは出来ています。
前のブログ(Nuxt.js
)のソースコード→ https://github.com/takusan23/ziyuutyou
前の前のブログ(Hexo
)→ https://takusan23.github.io/Bibouroku/
プライバシーポリシー
Google Analyticsを置いてます。これは私がこのサイトを見てくれた人が何人いるか等を見たいために置きました。 Google Analyticsはデータの収集でCookieを利用しています。 データ収集は匿名で行われており、個人がわかるような値は収集していません。 Cookieを無効化することでGoogle Analyticsの収集を拒否することができます。 詳しくはここへ→ https://policies.google.com/technologies/partner-sites?hl=ja
利用している技術 / ライセンス
thx!!!
- react
- react-dom
- next
- next-pwa
- @mui/icons-material
- @mui/material
- @emotion/react
- @emotion/styled
- gray-matter
- highlight.js
- BSD-3-Clause License
- https://github.com/highlightjs/highlight.js/blob/main/LICENSE
- rehype-stringify
- rehype-highlight
- rehype-raw
- remark-gfm
- remark-parse
- remark-rehype
- rehype-slug
- unified
- jsdom
- @types/react
- babel-plugin-inline-react-svg
- next-sitemap
- typescript
- Apache License 2.0
- https://github.com/microsoft/TypeScript/blob/main/LICENSE.txt
- Koruri Regular
- Apache License 2.0
- https://github.com/Koruri/Koruri/blob/master/LICENSE