Docs for useGrid?
See original GitHub issue🙋 Documentation Request
I see a hook called useGrid and it looks like what I need. I’m wondering if this is intended for public use, and if so, if there are any plans to document this hook. I’m gonna try to get as far as I can by following this example story
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
use-grid
use-grid is. a hook to build responsive layouts of all shapes and sizes. a fork of use-media that track the state of CSS...
Read more >VCS: useGrid() - Daily | API documentation
useGrid (). useGrid(): Object. Returns an object describing the composition's base design grid. Learn more about grid units in the Layout API docs....
Read more >The First Time You Use Grid - Grid.ai
This quick walkthrough will show you the steps you need to take in order to get up and running. Sign up for Grid;...
Read more >Usegrid 1: Launcher Quick-start - Apache Usergrid
Built with Sphinx using a theme provided by Read the Docs.
Read more >grid - CSS: Cascading Style Sheets - MDN Web Docs
The grid CSS property is a shorthand property that sets all of the explicit and implicit grid properties in a single declaration.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

We just released an RC of useGridList, which you could use in this case. Updated the listbox docs to link to that.
Glad that worked pretty well.
Should you run into issues with it, you could take inspiration from our Calendars, which look to be a fairly similar experience/usecase. I wouldn’t blindly copy it, I’d try to go for the general idea. Which is cells and rows are in state and provides functions to set the state to a given cell. When focus is set to a cell, when that cell re-renders, it’ll call focus on itself (so we don’t need to pass refs around). I’ve added links to the relevant code in order that I mentioned it in this overview.
https://github.com/adobe/react-spectrum/blob/main/packages/%40react-stately/calendar/src/useCalendarState.ts https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/calendar/src/useCalendarGrid.ts#L37 https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/calendar/src/useCalendarCell.ts#L201