colocation
co-location
>Place code as close to where it's relevant as possible
コンポーネントと、コンポーネントが要求するデータ(のクエリ)を近いところに配置したい、ということ
で、クエリタイミングで散らばったクエリを束ねてまとめてクエリする
今まで
featureっていいまくってたのは、colocationって言っていいな
featureという単位で
ファイル、モジュール単位での
コード上のvalue単位
つまり型、ddd made functional
tailwindのようなstyleをコンポーネント内に書くのも一種のcolocation
>@samselikoff: Co-location is what makes Tailwind code so easy to maintain and change over time.
>If you're new to Tailwind, avoid the gut reaction to DRY up your styles too soon. Doing so breaks that co-location, and the duplication often takes care of itself anyway.