You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Thanks for the hard work done on this library.
I hope my question will not be a loss of time for you
I am using fela in a react native project. It works well so far.
I have migrated to version 12 of react-fela in order to use useFela hook but I struggle with its usage.
According to the documentation the useFela hook should export a style element. https://fela.js.org/docs/latest/guides/usage-with-react-native#usefela
However typescript is complaining about that and my project crashes stating that style element does not exist.
Am I doing a bad implementation of it ? Or I am missing something ? Does the useFela API changed ?
Heyhey! You‘re actually doing everything right, the issue is on our end. I wrote the docs without ever actually adjusting the implementation.
You can try to use const { css } = useFela() despite the wrong naming that should work.
Once Im back from vacation I can also do a quick fix release
Hello @robinweser thanks for your quick answer.
Indeed it is working simply using css I could have seen that !
I only have a typescript error but it is not blocking :
No overload matches this call.
Overload 1 of 2, '(props: ViewProps | Readonly<ViewProps>): View', gave the following error.
Type 'string' is not assignable to type 'StyleProp<ViewStyle>'.
Overload 2 of 2, '(props: ViewProps, context: any): View', gave the following error.
Type 'string' is not assignable to type 'StyleProp<ViewStyle>'
Type: Bug
Description
Hello,
Thanks for the hard work done on this library.
I hope my question will not be a loss of time for you
I am using fela in a react native project. It works well so far.
I have migrated to version 12 of react-fela in order to use
useFela
hook but I struggle with its usage.According to the documentation the
useFela
hook should export astyle
element.https://fela.js.org/docs/latest/guides/usage-with-react-native#usefela
However typescript is complaining about that and my project crashes stating that style element does not exist.
Am I doing a bad implementation of it ? Or I am missing something ? Does the useFela API changed ?
Steps to reproduce
My
App.js
looks like :and my basic usage is a
MyComponent.tsx
My problems :
Property 'style' does not exist on type 'FelaHookProps<{}, {}>'.ts(2339)
Thanks in advance for any help you could provide
The text was updated successfully, but these errors were encountered: