score:2
Accepted answer
I was able to get around that error by adding in a converter.ts util, however if there is a better answer please post for points!
// ACTIONS
export const startGetPrices = () => (dispatch: any) => getLatest().then((res) => {
const ratesArray = converters.ratesIntoArray(res);
dispatch(actionGetPrices(ratesArray));
});
// utils/converters.ts
// Takes rates { key : value } pairs and converts into Array.
export const ratesIntoArray = ({ data: { rates } }: any) =>
Object.keys(rates).map(data => [data, rates[data]]);
Source: stackoverflow.com
Related Query
- Cannot access data property of Axios response object after successful GET request: Property 'data' does not exist on type 'void'
- Property 'then' does not exist on type 'RelayObservable<unknown>'. when I try to fetch data using relay in react. I don't know why this error come
- when I try to destructing the data from react query I am getting Property 'data' does not exist on type 'void'
- Property 'value' does not exist on type 'Readonly<{}>'
- TypeScript error: Property 'X' does not exist on type 'Window'
- typescript + react/redux: property "yyy" does not exist on type 'intrinsicattributes & intrinsicclassattributes
- Typescript complains Property does not exist on type 'JSX.IntrinsicElements' when using React.createClass?
- error TS2339: Property 'for' does not exist on type 'HTMLProps<HTMLLabelElement>'
- TypeScript error after upgrading version 4 useParams () from react-router-dom Property 'sumParams' does not exist on type '{}'
- Property 'exact' does not exist on type
- Property 'toBeInTheDocument' does not exist on type 'Matchers<any>'
- Trigger click in Typescript - Property 'click' does not exist on type 'Element'
- Property does not exist on type 'DetailedHTMLProps, HTMLDivElement>' with React 16
- TS2339: Property 'tsReducer' does not exist on type 'DefaultRootState'
- Property ... does not exist on type 'IntrinsicAttributes & ...'
- Property 'XYZ' does not exist on type 'Readonly<{ children?: ReactNode; }> & Readonly<{}>'
- Property 'hot' does not exist on type 'NodeModule'.ts(2339)
- TS2339: Property 'props' does not exist on type 'Home'
- TypeScript error: Property 'children' does not exist on type 'ReactNode'
- TypeScript error: Property 'scrollIntoView' does not exist on type 'never'. TS2339
- Property 'value' does not exist on type 'never'. when use useRef hook in mui
- ts(2322) Property children does not exist on type 'Intrinsic attributes and Props'
- Property does not exist on type 'IntrinsicAttributes & { children?: ReactNode; }'
- Generics error with forwardRef: Property 'ref' does not exist on type 'IntrinsicAttributes'
- Property 'current' does not exist on type '((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement>'
- In ReactJS trying to get params but I get property 'id' does not exist on type '{}'
- Property "value" does not exist on type Readonly
- Typescript Error: TS2339: Property 'span' does not exist on type 'JSX.IntrinsicElements'
- ReactJS TS, Property 'match' does not exist on type 'Readonly<{children?:ReactNode}> & Readonly<MyProps>'
- useRef Typescript error: Property 'current' does not exist on type 'HTMLElement'
More Query from same tag
- How do you hydrate a store using react_on_rails' Redux API?
- Fetching data from firestore collection in react js
- how to check that previous route is not null in react router v6?
- Use child interface as prop interface with generic interface
- Use enumValues from graphql introspection in SelectInput of react-admin
- Response from API returns data, state is undefined - React.JS
- React - Pass an array into setState?
- react-map-gl: Map Does Not Appear
- Render large number of components from a wrapper array allComponents
- Looping through table data React JS
- how to cancel web requests using interceptors?
- rendering component, after another distant component renders
- REACT Component not returning axios data
- Why are JS / React much quicker than WebAssembly / Rust?
- Redux-thunk with Websockets
- How to use template literals for concatenation in Javascript?
- ReactJS - Proper way to fetch data from redux and load form
- Cannot setState after receiving user from service provider
- Scoping issues with Context Provider using TypeScript
- State initialization inside a functional component (without infinite looping)
- Received true for a non-boolean attribute test React Test Jest with data-testid
- How to change the font color of Material UI table with makeStyles?
- Search functionality is not working for the frontend
- es6 - import all named module without alias
- react - map through spesific array depends on the url
- How do I show the return values from a function?
- how to edit/update initialState in slice redux
- req.cookies get overwritten when make request using nextjs
- How to import function from another file into reactjs component?
- How to declare this existing variable's type when playing Typescript system in React?