Skip to content

Instantly share code, notes, and snippets.

View sstackus's full-sized avatar
🤖

Simon Stackus sstackus

🤖
View GitHub Profile
@sstackus
sstackus / App.js
Last active June 24, 2024 16:05
Compose React context providers
import React from "react";
import Compose from "./Compose.js";
import Context from "./Context.js";
export default function App() {
const [foo] = React.useState(1);
const [bar] = React.useState(2);
return (
<Compose
@sstackus
sstackus / app.js
Last active January 15, 2020 17:33
Import aliases with the new ES Modules (Node.js 13.6) and dotenv
import Foo from '@/modules/Foo'; // This will import `src/modules/Foo.js`
import * as Modules from '@/modules'; // This will import `src/modules/index.js`