Skip to content

Instantly share code, notes, and snippets.

View arunmmanoharan's full-sized avatar

Arun Manohar Manoharan arunmmanoharan

View GitHub Profile
@arunmmanoharan
arunmmanoharan / useFetcherWithReset.ts
Last active December 10, 2023 22:13
Remix Fetcher With Reset
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.
*
@arunmmanoharan
arunmmanoharan / ParentComponent.ts
Created January 8, 2021 20:48
Gist for Uploading Multiple Files to Azure - react
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);
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