How do I add custom loading screen to react komposer?

React komposer docs say that custom loading screen is added like this:

const MyLoading = () => (<div>Hmm…</div>);
const Container = compose(composerFunction, MyLoading)(Component);

But composeWithTracker() is used in Meteor instead of compose().

When use it in the example above like this:

const Container = composeWithTracker(composerFunction, MyLoading)(Component);

I get the following error on browser console:

Uncaught ReferenceError: React is not defined

How do I add custom loading screen to react komposer?

did you found the solution

If you’re using JSX you need to import react in that file. The MyLoading component is using JSX.

import react from 'react';