question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Outdated @reduxjs/toolkit definition

See original GitHub issue

Library definition file name

@reduxjs/toolkit_v1.x.x/flow_v0.104.x-/toolkit_v1.x.x.js

Your dependent version

1.8.2

Flow Version

0.179.0

Description


Cannot resolve name T. [cannot-resolve-name]

     161β”‚    *
     162β”‚    * @public
     163β”‚    */
     164β”‚   declare function createAction(type: T): ActionCreatorWithoutPayload<typeof T>;
     165β”‚   declare function createAction<P = void>(type: T): ActionCreatorWithPayload<P, typeof T>;
     166β”‚
     167β”‚   /**


Error β”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆ flow-typed/npm/@reduxjs/toolkit_v1.x.x.js:185:144

Cannot resolve name A. [cannot-resolve-name]

     182β”‚    *
     183β”‚    * @public
     184β”‚    */
     185β”‚   declare function createReducer<S, CR = {| [string]: (S, Action<string>) => S |}>(initialState: S, actionsMap: CR): (state: S | void, action: A) => S;
     186β”‚
     187β”‚
     188β”‚   /**


Error β”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆ src/store.js:2:9

Cannot import configureStore because there is no configureStore export in @reduxjs/toolkit. [missing-export]

     1β”‚ // @flow
     2β”‚ import {configureStore} from '@reduxjs/toolkit';
     3β”‚ import {connectRouter, routerMiddleware} from 'connected-react-router';
     4β”‚ import thunk from 'redux-thunk';
     5β”‚ import {createBrowserHistory} from 'history';



Found 6 errors
error Command failed with exit code 2.

Do you want to submit a pull request to fix this issue?

No (hope someone else can)

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
michaelmiorcommented, Jun 9, 2022

Thanks so much for spending your time on this! Not sure why I didn’t have the same errors before, but switching the type imports fixed things πŸ˜ƒ

1reaction
Brianzchencommented, Jun 8, 2022

I see, let me see what I can do

Read more comments on GitHub >

github_iconTop Results From Across the Web

Differences Between Redux and Redux Toolkit and Why ...
As you can see, A Reducer in old Redux is an anonymous function that contains a switch case statement that returns a state...
Read more >
Why Redux Toolkit is How To Use Redux Today
Redux Toolkit (also known as "RTK" for short) is our official recommended approach for writing Redux logic. The @reduxjs/toolkit packageΒ ...
Read more >
Redux is Dead: Long Live Redux Toolkit - OpenReplay Blog
In this article, let's learn about Redux Toolkit, or as the development team calls it, β€œthe official, opinionated, batteries-included ...
Read more >
Redux code is following very outdated practices - would you ...
The Redux code currently in this Project follows very outdated Redux patterns. ... The toolkit docs uses very simple examples.
Read more >
Redux Toolkit: Usage Guide with Examples - KnowledgeHut
It is advised to use the redux js toolkit only to develop fewer complex applications. So, in this article, we will discuss more...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found