React Hooks / Functional Components in an Atmosphere Package?

Hello Forums!

Has anybody managed to get an example of a react functional component working in an Atmosphere package? Any that I have tried to create appear to be getting wrapped by a class component, which breaks the Hook functionality.

In effect, it seems React 16.8 was a breaking change for Atmosphere users until we can figure out a workaround. I’m seeing more and more libraries (like Nivo.js) that are using the latest code patterns, and I can get them to work in a basic Meteor app; but not from Atmosphere packages.

Thoughts and ideas definitely appreciated,

I haven’t observed anything like that. An example would be npdev:react-loadable which uses a functional component. Do you have an example where this is happening?

1 Like

:le sigh:

I’ll get started on an example/reproduction. Will try to have it this evening.

ps. Thanks for the lead on npdev-react-loadable. It looks like I’m finally getting around to rewriting our main app into a functional component, so now’s the time to be adding some things in like code-splitting.


It was our app. I tried to create a reproduction of the error, but everything worked as expected. Which has subsequently kicked off a 2 week long rebuild of our main app. Yay.

(But damn, rewriting the entire app as Functional Components is awesome and paying down hella crazy amounts of technical debt.)

1 Like