question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
devongovettcommented, Jul 29, 2022

We just released an RC of useGridList, which you could use in this case. Updated the listbox docs to link to that.

1reaction
snowystingercommented, Feb 28, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found