[Solved] React-template-helper broken?

I was trying to use the react-template-helper package, but am only getting the error message:

Error: In template "home", call to {{> React ... }} missing component argument.

although the component argument has been provided via a helper.

There’s some posts on these forms (without any solution) and also an issue in the repo:

but this is open for over 1 year (!) now. Is there any chance to use this package, as recommended by the Meteor Guide, or am I just missing some detail? I am trying to use this inside an Atmosphere package, if that matters.

I read in one of the threads, that this might be an issue with the most recent React version. So I am wondering if there is a “recommended React version” for Meteor?

Side-note: When I tried to require this package in my private Atmo package like this:

api.use('react-template-helper@0.2.9');

Meteor reported it couldn’t find it. Only after I added it via meteor add react-template-helper and removed it again, the reference in the package worked as expected.

Mixing Blaze and React seems to be quite a challenge… Sorry for spamming today. :frowning:

Not sure how much it will help you, but I just started toying around with this package on Monday, so I’m guessing I was on the same version of React as you. Any time I saw that error, it was due to a broken import being passed to the helper.

Had a quick look at that thread, and I can confirm that stateful and functional components were coming in properly.

1 Like

Ok, thanks for the info. The imports seem fine, but I am double-checking now.

No worries. In my case, I was missing the .jsx extensions.

1 Like

Indeed I had an error in my code. The import was correct, but the helper was not:

HomeComponent: () => HomeContainer

instead of

HomeContainer: () => HomeContainer

Thanks again!

1 Like