score:3
Accepted answer
you're passing the object with all of helloreducer
's exports instead of just the reducer. there's a couple of ways to fix it. you can select the reducer:
const reducer = combinereducers<storestate.all>({
enthusiasm: enthusiasmreducer.enthusiasm
});
or import only the reducer:
import {enthusiasm} from './helloreducer';
..
const reducer = combinereducers({enthusiasm});
or add export default enthusiasm;
to helloreducer.tsx
and change the import to
import enthusiasmreducer from './helloreducer';
Source: stackoverflow.com
Related Query
- CombineReducers with Typescript returns error "Argument of type is not assignable to parameter of type 'ReducersMapObject'"
- Creating reusable Button Component with React and Typescript with not assignable type error
- Stateful Component with Typescript and react-redux: Argument of type 'typeof MyClass' is not assignable to parameter of type Component
- Argument of type is not assignable to parameter of type Typescript Error
- How to fix the error argument of type string or undefined is not assignable to parameter of type string using typescript and react?
- Typescript error on React Component: Argument of type 'Element' is not assignable to parameter of type
- TypeScript error Argument of type is not assignable to parameter of type Appstate despite having all necessary types included
- TypeScript Error (TS2345) argument of type Person | undefined is not assignable to paramater of type Person
- Typescript Compilation Error with React - Type 'Element' is not assignable to type 'FunctionComponent<{}>'
- Typescript returning error Argument of type is not assignable but it seems like it is confusing one function for another
- Argument of type 'File' is not assignable to parameter of type 'never'. React with TypeScript
- TypeScript Error Argument of type '{}' is not assignable to parameter of type 'Variable Y'
- How to fix error argument of type undefined is not assignable to parameter of type 'string or () => string usng typescript and react?
- React Typescript - Argument of type is not assignable to parameter of type
- getting error : Argument of type '() => () => boolean' is not assignable to parameter of type 'EffectCallback'
- Typescript React/Redux : Argument of type 'typeof MyClass' is not assignable to parameter of type 'ComponentType<...'
- React with Typescript: Argument of type 'never[]' is not assignable to parameter of type 'StateProperties | (() => StateProperties)'
- React + Redux-Observable + Typescript - Compilation, Argument Not Assignable Error
- React with TypeScript - Type {...} is not assignable to type 'Readonly<S>'
- React Typescript error in TextArea : Type 'string' is not assignable to type number
- Getting an error Argument of type 'unknown' is not assignable to parameter of type 'Error | null'
- Transpiling error in Typescript with React: Property does not exist on type 'IntrinsicAttributes'
- React js Typescript Argument of type 'string' is not assignable to parameter of type 'SetStateAction<number>'
- React Custom Hook with Typescript Type error "Property 'x' does not exist on type 'interface | (({ target }: any) => void)'.ts(2339)"
- Typescript returns error when a function type is FunctionalComponent, but not for arrow function
- Typescript error 'argument of type is not assignable to parameter of type'
- Property does not exist on type error with Union Types in Typescript Reac + Redux
- TypeScript error : Type '.....' is not assignable to type 'IntrinsicAttributes & Number'
- TypeScript w/ React - Argument of type 'string' is not assignable to parameter of type 'keyof T'
- How do I fix a React TypeScript error with the return value of useHotkeys hook not matching the type of the div element ref prop
More Query from same tag
- React setState() is not updating
- How to use an abstract class as the type of a React component in TypeScript?
- react-redux update item in array doesn't re-render
- Bug delete el on array
- google-map-react marker clustering issue
- Objects not valid issue
- Removing a specific element in an array with React
- API not returning the correct JSON (react/express/axios)
- React/Forms: How to wait for updated data by useEffect when the user submits data and submitting triggers the useEffect (which takes time)
- Problem with a Cast using Router.put with mongoDB in MERN app
- Test a React Component with Jest
- Add, Delete, Change, Disable/Enable menu items dynamically in material-ui and react
- Limiting number of inputs
- Add Tooltip over a button
- How can I use React.useRef() of a component in another component?
- Warning: Encountered two children with the same key, `[object Object]
- Single ant upload list item only
- input value of react doesn't not sync with dom
- React: Unexpected token return
- how can i get input data from two dynamic form in react class component?
- How to add props to state
- React push to view after successful purchase
- es6 syntax for exporting modules in one file
- React Hooks Question: opening a modular modal
- React Redux error Unhandled Rejection (TypeError): Cannot read property 'data' of undefined
- Animation from bottom for border-bottom
- react mentions text area doesn't grow with text
- Why ternary operator in JS with multiple statements is not working?
- How to customise the tooltip data in react 'recharts'?
- Form values coming as blank on submit