
3/31/2023
What this post added
This post details the migration of Shopify's Retail Point of Sale app from Vanilla Redux to Redux Toolkit (RTK). It outlines the decision-making process, the chosen migration strategy (balanced approach over full rewrite), and the implementation details. Key technical contributions include the coexistence of Vanilla Reducers and RTK Slices, the use of mutable syntax provided by RTK, and a hybrid approach to migrating asynchronous logic using `createAsyncThunk` and ThunkAPI due to GraphQL incompatibility with RTK Query. The post also highlights lessons learned, such as the importance of explicit typing for hooks and using `unwrap` for awaited dispatch calls.