This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { FetcherWithComponents } from "@remix-run/react"; | |
import { useFetcher } from "@remix-run/react"; | |
import { useEffect, useState } from "react"; | |
import type { AppData } from "@remix-run/react/dist/data"; | |
import type { SerializeFrom } from "@remix-run/server-runtime"; | |
/** | |
* A higher-order function that creates a new FetcherWithComponentsReset instance, which extends the FetcherWithComponents interface. | |
* The new instance includes an additional method `reset` that can be used to reset the state of the fetcher. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const callback = (callbackData: any, file: any) => { | |
console.log('callbackData', callbackData); | |
console.log('file', file); | |
}; | |
const data = await uploadMultipleFilesToAzure( | |
result, | |
handleProgress, | |
callback | |
); | |
const promiseData = await Promise.all(data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Please complete the exercise using React-hooks | |
https://react-coding-trinity.azurewebsites.net/ | |
• I have a currency converter API | |
https://api.frankfurter.app/latest?amount=10&from=USD&to=CAD | |
• Use the above API and generate a currency converter application based on the below layout. Feel free to use any IDE of your choice. | |
• Currencies supported are USD, CAD, GBP and EUR | |
• Default value in dropdown 1 should be USD and in dropdown 2 should be CAD | |
• Dropdown 2 should behave both as a placeholder and an input |