Skip to content

Instantly share code, notes, and snippets.

View UgoLaurit's full-sized avatar

Ugo Laurit UgoLaurit

  • Biarritz, France
  • 11:44 (UTC +02:00)
View GitHub Profile
@UgoLaurit
UgoLaurit / .env
Created May 9, 2023 12:42
OpenAI API key
KEY=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
@UgoLaurit
UgoLaurit / index.md
Created April 13, 2023 15:19
Initialize monorepo

‎‎​

@UgoLaurit
UgoLaurit / component.tsx
Last active April 6, 2023 07:59
React functionnal component
import { ComponentPropsWithoutRef } from "react";
export type ComponentProps = {} & ComponentPropsWithoutRef<"div">;
export const Component = ({ ...props }: ComponentProps) => {
return (
<>
<div {...props}>MyComponent</div>
</>
);
@UgoLaurit
UgoLaurit / App.tsx
Last active April 5, 2023 14:44
React context
import { DataProvider } from "./contexts";
function App() {
return (
<>
<DataProvider>
<></>
</DataProvider>
</>
);
@UgoLaurit
UgoLaurit / component.tsx
Last active April 5, 2023 12:50
React Query hook snippet
export type ComponentProps = {};
export const Component = ({ ...props }: ComponentProps) => {
const { isLoading, isError, data } = useGetData();
return <></>;
};