![]() ![]() You can override this behaviour, which could be useful for SSR as well. Until the hook receives the first measurement, it returns undefined for width On initial mount the ResizeObserver will take a little time to report on the Here is an example for a simple hook accomplishing that. You might want to receive values less frequently than changes actually occur.Īnother popular concept are breakpoints. ![]() ![]() This callback also makes it possible to implement your own hooks that report onlyĪs this hook intends to remain low-level, it is encouraged to build on top of it via hook composition, if additional features are required. Undefined | "border-box" | "content-box" | "device-pixel-content-box"
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |