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
I'm trying to write a few programs that use react, reactfire, capacitor, and this plugin. however, it seems that this plugin is based heavily on Promises, which aren't fully supported in react functional components. with react's suspense, we can achieve a functionality similar to async / await with hooks; we can wait until the hook completes and instead render a different component.
I can use promises in React with a workaround but it would be far better if there were react hooks. is this possible? I'm also happy to develop and PR some code but would need some guidance first.
Preferred solution
It would be great to have a similar interface as reactfire's implementation. for example:
import {useUser} from 'reactfire';
[...]
const {user} = useUser();
however, it seems that this plugin is based heavily on Promises
Yes, this is how Capacitor plugins work. Unfortunately, React hooks are not in the scope of this plugin. For one thing, I have no experience with React myself. Secondly, the maintenance of all plugins is already very time-consuming. Adding framework-specific code to the plugins would not be maintainable for me. For this reason, I am currently not planning to add any support.
Plugin(s)
Current problem
I'm trying to write a few programs that use react, reactfire, capacitor, and this plugin. however, it seems that this plugin is based heavily on Promises, which aren't fully supported in react functional components. with react's suspense, we can achieve a functionality similar to async / await with hooks; we can wait until the hook completes and instead render a different component.
I can use promises in React with a workaround but it would be far better if there were react hooks. is this possible? I'm also happy to develop and
PR
some code but would need some guidance first.Preferred solution
It would be great to have a similar interface as reactfire's implementation. for example:
Alternative options
No response
Additional context
No response
Before submitting
The text was updated successfully, but these errors were encountered: