accounts-ui: Component not rendered & Error with Meteor 1.6
I get this error when using with Meteor 1.6.1 and FlowRouter, using the following code:
import { Accounts } from 'meteor/std:accounts-ui';
...
FlowRouter.route("/login", {
action(params) {
mount(AppLayout, {
content: <Accounts.ui.LoginForm />
});
}
});
Warning: Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.
in Unknown
in div (created by AppLayout)
in AppLayout
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 16
- Comments: 22
Looks like it’s solved with this pull request: https://github.com/studiointeract/accounts-ui/pull/138/files
If you need it now, you can create a directory called “packages” in your meteor app. Then you’ll git clone this repo, edit the packages.json to change version to 1.3.2, and edit your .meteor/packages to reflect @1.3.2 as the version for this package. You can then edit the file as shown in that pull request, and bam! It’ll work ❤️
Meteor 1.7 was released, still no update on this?
Can that pull request just be merged into master?
@tab00 no. I was forking it by myself and just added a couple changes. I might should make a pull request back to the project.
See my changes: https://github.com/Doichain/accounts-ui/commit/8cf24a1c3a161723faa6a8fb046f4d45ded5967c (I don’t know the actual progress of this issue here, why nobody fixes it or if its fixed somewhere else now)
What you have to do in order to use it:
Let me know if it works for you. P.S. I was adapting a accounts-material-ui on top of it in case you like to try it: Works the same way - just put it into packages: https://github.com/Doichain/accounts-material.git
I cloned a forked repo which seems to work or doesn’t throw an error right now https://github.com/idmadj/accounts-ui.git
I have this same error while using react-router.
how about we decide to continue with https://github.com/idmadj/accounts-ui.git then?
it seems to work.
Hi @inspiraluna , react@16.6.3 (meteor 1.8 too), I’m trying https://github.com/royGil/accounts-react now …
@inspiraluna the package
accounts-ui
requiresreact-tap-event-plugin
, however once installed, it throws “Cannot read property ‘injection’ of undefined”.I believe others have removed this dependency successfully, and this should get updated.
Also, Material UI is at version 3.1.1 while your module depends on 0.16.x. It’s about time to upgrade 😝