Closed wangbinyq closed 4 months ago
@wangbinyq Just checked and this is a bug in the Preact adapter of tabler-icons
. For some reason they are spreading the remaining props and trying to render that as a JSX child which causes the error. Preact throws this error because rendering random untrusted objects could easily lead to security vulnerabilities. The fix in table icon is to spread the remaining props into the props
object where it belongs. Basically, the same way they already do it in their react adapter.
Opened a PR that fixes the issue in tabler-icon
, see: https://github.com/tabler/tabler-icons/pull/1084
Closing as it's not an issue in Fresh, but in tabler-icons
. Once they release a new version with the fix you'll be able to use tabler-icons
with Preact.
The following island component that use @tabler/icons-preact report errors during development. However, if I build the project and run it, it works correctly. Additionally, if I use @tabler/icons-react with compat enabled, it also works without issues. My expectation is that @tabler/icons-preact should work seamlessly without any additional configuration. You can reproduce this issue with the repository: : https://github.com/wangbinyq/tabler-icons-preact-error.