[change] Add usePlatformMethods to implement instance methods

A hook equivalent for implementing "native methods" on refs to elements backed
by function components.
This commit is contained in:
Nicolas Gallagher
2020-02-03 10:50:30 -08:00
parent 51ac083d56
commit a2cccaf528
5 changed files with 89 additions and 10 deletions
+10
View File
@@ -0,0 +1,10 @@
/* eslint-env jasmine, jest */
// JSDOM doesn't implement ResizeObserver
class ResizeObserver {
disconnect() {}
observe() {}
unobserve() {}
}
window.ResizeObserver = ResizeObserver;