studiointeract / accounts-ui

Accounts UI for React in Meteor 1.3+
MIT License
196 stars 80 forks source link

Component not rendered & Error with Meteor 1.6 #139

Open sgup opened 6 years ago

sgup commented 6 years ago

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
hitch90 commented 6 years ago

I have this same error while using react-router.

jasongrishkoff commented 6 years ago

Ditto, same error.

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.
jasongrishkoff commented 6 years ago

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 <3

tab00 commented 6 years ago

Can that pull request just be merged into master?

jmarceli commented 6 years ago

Thanks @jasongrishkoff In your "instruction" there is one mistake (I think), version change should be done inside packages/accounts-ui/package.js file not packages/accounts-ui/packages.json.

yanickrochon commented 6 years ago

Who are the maintainers of this repository? Is this project dead?

yanickrochon commented 6 years ago

Meteor 1.7 was released, still no update on this?

kwunyeung commented 6 years ago

Very strange, even my PR #135 fixed this, the maintainer closed it without merging it. Only the createContainer was replace with withTracker.

silkroadnomad commented 6 years ago

I cloned a forked repo which seems to work or doesn't throw an error right now https://github.com/idmadj/accounts-ui.git

ratcliffej commented 6 years ago

+1 for this problem too. Many thanks for your patch @jasongrishkoff!

tab00 commented 6 years ago

@inspiraluna, is it an atmosphere package (that we can install by meteor add)?

silkroadnomad commented 6 years ago

@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:

  1. make a folder 'packages' in your meteor project directory
  2. cd packages git clone https://github.com/Doichain/accounts-ui.git
  3. meteor should reload the package.

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

yanickrochon commented 5 years ago

@inspiraluna the package accounts-ui requires react-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 :stuck_out_tongue_closed_eyes:

lc3t35 commented 5 years ago

Facing the same issue, no updates since months, if this repo is no more maintained, please state it clearly in the README so we don't waste time to install it. Thank you.

silkroadnomad commented 5 years ago

Hello @lc3t35 , it's interesting because last night I was updating my meteor 1.8 (with react 15.x to react 16.6.3. I also had this problem. So I removed react-tap-event-plugin to work with react 16.6.3. See: https://github.com/Doichain/accounts-ui/releases/tag/release-1.2.24 Do you use react 16.x? I am not yet a react professional, since I mostly do other things durring the day. So I'd be very happy to get some comments or recommendations on that. Thanks @yanickrochon btw. on your hints which I overread as it seems.

lc3t35 commented 5 years ago

Hi @inspiraluna , react@16.6.3 (meteor 1.8 too), I'm trying https://github.com/royGil/accounts-react now ...

silkroadnomad commented 5 years ago

makes sense. Let us know here how it was going maybe I'd like to switch too!

silkroadnomad commented 5 years ago

@lc3t35 which styling do you use? I am porting to material ui now.

JonathanLehner commented 5 years ago

how about we decide to continue with https://github.com/idmadj/accounts-ui.git then?

it seems to work.

silkroadnomad commented 5 years ago

@JonathanLehner seems to use react 15 - in case you want to be up to date with react 16 the whole router 4 situation needs to be changed in this package. https://github.com/royGil/accounts-react uses the new react router 4.

JonathanLehner commented 5 years ago

I tried it with my code and it seems to work. I think react 15 and 16 are mostly compatible.

On Sun, 23 Dec 2018, 02:46 Nico Krause <notifications@github.com wrote:

@JonathanLehner https://github.com/JonathanLehner seems to use react 15

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/studiointeract/accounts-ui/issues/139#issuecomment-449620198, or mute the thread https://github.com/notifications/unsubscribe-auth/AWDnnDE1E0S_gY10bl_w2x0t6c178JRfks5u7zTZgaJpZM4SbJkd .

derwaldgeist commented 5 years ago

Please clearly mark this package as being deprecated. It's a waste of time installing it if such a basic error pops up und no fixes have been provided since over a year. Thanks.