下記の記事にバケツリレーについて言及している部分があります。
(Mentioning fragment about 'Bucket Relay' at bottom article.)
そこを自分なりに書いてみました。
(I wrote it so that I could easily understand for me.)
stateをどのコンポーネントからも参照できる利点が少し分かった気がします。
(I feel like a little understand about merit of can reference state from any component.)
https://programmagick.com/chapter?course=react_tutorial&slug=react_basis_props_state#prop_drilling
書いたコード(Wrote code)
中身のreducers/isLoggedIn.js
のstateを変えることで見た目が一気に変わります。
(Appearance will change by state
in reducers/isLoggedIn.js
.)
https://codesandbox.io/s/reactredux-ke1f1?fontsize=14
※因みにログインボタンは動きません。