Cannot setup Redux debugging with `remote-redux-devtools`

So I’ve been trying to incorporate remote-redux-devtools in my middleware for debugging of Redux in React Native.
Previously I used Flipper but since it’s being depricated I need to find another solution.

For the life of me I cannot get this to work. What am I doing wrong?

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>const getStoreConfig = (rpc: Rpc<RpcMethods>) => {
const middlewareCompose = new Tuple(
StoreCallMiddleware(),
RpcCallMiddleware(rpc),
);
// if (__DEV__) {
// const createDebugger = require('redux-flipper').default;
// middlewareCompose.push(createDebugger());
// }
if (__DEV__) {
import('remote-redux-devtools')
.then(({composeWithDevTools}) => {
const compose = composeWithDevTools({
realtime: true,
name: 'Your Instance Name',
hostname: '10.19.188.26',
port: 8000, // the port your remotedev server is running at
});
return {
reducer,
middleware: compose(middlewareCompose),
devTools: true,
};
})
.catch(error => {
console.error('Error loading remote-redux-devtools', error);
});
}
return {
reducer,
middleware: () => middlewareCompose,
devTools: false,
};
};
const store = (rpc: Rpc<RpcMethods>) => {
return configureStore(getStoreConfig(rpc));
};
export type RootState = ReturnType<typeof reducer>;
export default store;
</code>
<code>const getStoreConfig = (rpc: Rpc<RpcMethods>) => { const middlewareCompose = new Tuple( StoreCallMiddleware(), RpcCallMiddleware(rpc), ); // if (__DEV__) { // const createDebugger = require('redux-flipper').default; // middlewareCompose.push(createDebugger()); // } if (__DEV__) { import('remote-redux-devtools') .then(({composeWithDevTools}) => { const compose = composeWithDevTools({ realtime: true, name: 'Your Instance Name', hostname: '10.19.188.26', port: 8000, // the port your remotedev server is running at }); return { reducer, middleware: compose(middlewareCompose), devTools: true, }; }) .catch(error => { console.error('Error loading remote-redux-devtools', error); }); } return { reducer, middleware: () => middlewareCompose, devTools: false, }; }; const store = (rpc: Rpc<RpcMethods>) => { return configureStore(getStoreConfig(rpc)); }; export type RootState = ReturnType<typeof reducer>; export default store; </code>
const getStoreConfig = (rpc: Rpc<RpcMethods>) => {
  const middlewareCompose = new Tuple(
    StoreCallMiddleware(),
    RpcCallMiddleware(rpc),
  );

  // if (__DEV__) {
  //   const createDebugger = require('redux-flipper').default;
  //   middlewareCompose.push(createDebugger());
  // }

  if (__DEV__) {
    import('remote-redux-devtools')
      .then(({composeWithDevTools}) => {
        const compose = composeWithDevTools({
          realtime: true,
          name: 'Your Instance Name',
          hostname: '10.19.188.26',
          port: 8000, // the port your remotedev server is running at
        });

        return {
          reducer,
          middleware: compose(middlewareCompose),
          devTools: true,
        };
      })
      .catch(error => {
        console.error('Error loading remote-redux-devtools', error);
      });
  }

  return {
    reducer,
    middleware: () => middlewareCompose,
    devTools: false,
  };
};

const store = (rpc: Rpc<RpcMethods>) => {
  return configureStore(getStoreConfig(rpc));
};

export type RootState = ReturnType<typeof reducer>;

export default store;

Specifically get an error here for middleware: compose(middlewareCompose)

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Argument of type 'Tuple<[Middleware<{}, any, Dispatch<UnknownAction>>, Middleware<{}, any, Dispatch<UnknownAction>>]>' is not assignable to parameter of type 'StoreEnhancer'.
Type 'Tuple<[Middleware<{}, any, Dispatch<UnknownAction>>, Middleware<{}, any, Dispatch<UnknownAction>>]>' provides no match for the signature '(next: StoreEnhancerStoreCreator<{}, {}>): StoreEnhancerStoreCreator<{}, {}>'.ts(2345)
</code>
<code>Argument of type 'Tuple<[Middleware<{}, any, Dispatch<UnknownAction>>, Middleware<{}, any, Dispatch<UnknownAction>>]>' is not assignable to parameter of type 'StoreEnhancer'. Type 'Tuple<[Middleware<{}, any, Dispatch<UnknownAction>>, Middleware<{}, any, Dispatch<UnknownAction>>]>' provides no match for the signature '(next: StoreEnhancerStoreCreator<{}, {}>): StoreEnhancerStoreCreator<{}, {}>'.ts(2345) </code>
Argument of type 'Tuple<[Middleware<{}, any, Dispatch<UnknownAction>>, Middleware<{}, any, Dispatch<UnknownAction>>]>' is not assignable to parameter of type 'StoreEnhancer'.
  Type 'Tuple<[Middleware<{}, any, Dispatch<UnknownAction>>, Middleware<{}, any, Dispatch<UnknownAction>>]>' provides no match for the signature '(next: StoreEnhancerStoreCreator<{}, {}>): StoreEnhancerStoreCreator<{}, {}>'.ts(2345)

I’ve tried middleware: compose(applyMiddleware(...middlewareCompose))

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Argument of type 'StoreEnhancer<{ dispatch: unknown; }, {}>' is not assignable to parameter of type 'StoreEnhancer'.ts(2345)
Argument of type 'StoreEnhancer<{ dispatch: unknown; }, {}>' is not assignable to parameter of type 'StoreEnhancer'.
Types of parameters 'next' and 'next' are incompatible.
Types of parameters 'preloadedState' and 'preloadedState' are incompatible.
Type 'PreloadedState | undefined' is not assignable to type 'PreloadedState<S> | undefined'.
Type 'PreloadedState' is not assignable to type 'PreloadedState<S> | undefined'.ts(2345)
redux.d.ts(324, 103): This type parameter might need an `extends PreloadedState<S> | undefined` constraint.
</code>
<code>Argument of type 'StoreEnhancer<{ dispatch: unknown; }, {}>' is not assignable to parameter of type 'StoreEnhancer'.ts(2345) Argument of type 'StoreEnhancer<{ dispatch: unknown; }, {}>' is not assignable to parameter of type 'StoreEnhancer'. Types of parameters 'next' and 'next' are incompatible. Types of parameters 'preloadedState' and 'preloadedState' are incompatible. Type 'PreloadedState | undefined' is not assignable to type 'PreloadedState<S> | undefined'. Type 'PreloadedState' is not assignable to type 'PreloadedState<S> | undefined'.ts(2345) redux.d.ts(324, 103): This type parameter might need an `extends PreloadedState<S> | undefined` constraint. </code>
Argument of type 'StoreEnhancer<{ dispatch: unknown; }, {}>' is not assignable to parameter of type 'StoreEnhancer'.ts(2345)
Argument of type 'StoreEnhancer<{ dispatch: unknown; }, {}>' is not assignable to parameter of type 'StoreEnhancer'.
  Types of parameters 'next' and 'next' are incompatible.
    Types of parameters 'preloadedState' and 'preloadedState' are incompatible.
      Type 'PreloadedState | undefined' is not assignable to type 'PreloadedState<S> | undefined'.
        Type 'PreloadedState' is not assignable to type 'PreloadedState<S> | undefined'.ts(2345)
redux.d.ts(324, 103): This type parameter might need an `extends PreloadedState<S> | undefined` constraint.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật