Make this also a React Native compatible library.
Currently, when importing using the standard method described in the documentation, the following error occurs during server rendering:
TypeError: window.matchMedia is not a function (it is undefined)
This error occurs because the Toaster component in the sileo library (or one of its dependencies such as Framer Motion) attempts to use the window.matchMedia API to detect system preferences (such as dark mode or motion reduction). See here or here.
Sileo uses browser APIs (such as window.matchMedia and SVG filters) that do not exist in the native React Native environment, so it is not compatible with the native iOS and Android engines.
Make this also a React Native compatible library.
Currently, when importing using the standard method described in the documentation, the following error occurs during server rendering:
TypeError: window.matchMedia is not a function (it is undefined)This error occurs because the Toaster component in the sileo library (or one of its dependencies such as Framer Motion) attempts to use the window.matchMedia API to detect system preferences (such as dark mode or motion reduction). See here or here.
Sileo uses browser APIs (such as window.matchMedia and SVG filters) that do not exist in the native React Native environment, so it is not compatible with the native iOS and Android engines.