Skip to content

Instantly share code, notes, and snippets.

@harrybanda
Created September 21, 2021 14:14
Show Gist options
  • Save harrybanda/6160f5e5e7f077c5229d0af7f66511ec to your computer and use it in GitHub Desktop.
Save harrybanda/6160f5e5e7f077c5229d0af7f66511ec to your computer and use it in GitHub Desktop.
index.js
import ForgeUI, { render, Fragment, Macro, useState } from "@forge/ui";
import { BooksTable } from "./BooksTable";
import { BookDialog } from "./BookDialog";
const App = () => {
const [isOpenModal, setOpenModal] = useState(false);
const [books, setBooks] = useState([]);
return (
<Fragment>
<BooksTable books={books} setOpenModal={setOpenModal} />
<BookDialog
books={books}
setBooks={setBooks}
isOpenModal={isOpenModal}
setOpenModal={setOpenModal}
/>
</Fragment>
);
};
export const run = render(<Macro app={<App />} />);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment