I'm working on a prototype in FramerX, and our production software uses Ag-Grid for a large number of components. I need to be able to incorporate Ag-Grid in my latest prototype.
Does anyone know how I can go about setting this up at the most basic level?
I was able to figure out how to make the simple ag-grid table provided in the AG-Grid starter tutorial: https://stackblitz.com/edit/ag-grid-react-hello-world
The trick was that I forgot that FramerX uses TypeScript syntax so there were a few things that need to be modified about the example. Below is the code I ultimately ended up using. I'll go through the edits that I had to make.
First instead of calling out React and Component separately in the import like this:
I imported React with the wildcard like show Framer typically does it:
Then since this is TypeScript with React, you need to define the props and states in the interface before the component. Make sure that the states are set as objects because they will be arrays.
Then I rewrote the component function to have the export at the beginning, and called "MyProps" and "MyState" interfaces in the function, again since this is TypeScript.
Last but not least, I changed the
<div>...</div>to a<Frame>...</Frame>by including Framer's module: