Blocker: Removing remaining usages of the custom `connect()` hoc
Closed this issue · 0 comments
UncleClapton commented
The redux patterns of old leave the website rather bloated since our entire redux boilerplate needs to be included with the initial download. Removing this hard coupling to ~/store
may improve bundle sizes. Further, the old react-redux patterns of mSTP
and mDTP
are rather inflexible and should really be avoided.
I am going through each connected class component and either rewriting them or removing their coupling to the store.
This progress can be tracked on the refactor/remove-connect-hoc
branch.
Remaining tasks (as of issue creation):
-
<AddRatForm />
- rewrite to
useForm()
based form component.
- rewrite to
-
<RatLeaderboardTable />
- Rewrite to hooks-based function component.
-
<AddNicknameForm />
- Rewrite to
useForm()
based form component.
- Rewrite to
-
<LoginModal />
- Use hook-based wrapper function.
-
<DefaultRatButton />
- Why is this even a class?
-
<RatCard />
- Rewrite to hooks-based function component.
-
<RatShipLine />
- Delete. unused and empty component.
-
<TermsModal />
- Rewrite to hooks-based function component.
-
<UserNicknamesPanel />
- Rewrite to hooks-based function component.
-
~/pages/[slug].js
- Investigate further.
-
~/pages/authorize.js
- rewrite to hook-based function.
-
~/pages/i-need-fuel.js
- rewrite to hook-based function.
-
~/pages/admin/rescues.js
- This page doesn't work anyway right now, and due for reimplementation.
-
~/pages/paperwork/[rescueId]/edit.js
- Write hook-based wrapper for now.
-
~/pages/paperwork/[rescueId]/index.js
- Write hook-based wrapper for now.
-
~/store
- Remove custom connect HoC.