christianalfoni / cerebral-react-baobab

A Cerebral package with React and Baobab
MIT License
13 stars 1 forks source link

Error when using decorator #5

Closed saulshanabrook closed 9 years ago

saulshanabrook commented 9 years ago

I am currently getting an error when using the component decerator, like in the example:

Uncaught TypeError: (0 , _cerebralReactBaobab2.default)(...) is not a function

My code looks like this:

import Decorator from 'cerebral-react-baobab'

export default @Decorator({
  systems: ['synced', 'live', 'systems']
})
class LiveList extends Component {
  ...
}

I will try the alternative methods (HOC and mixins) to see if I can get those to work.

This is most likely an error on my part, but hopefully if someone else does the same thing they can see my solution here.

saulshanabrook commented 9 years ago
import Decorator from 'cerebral-react-baobab'

should be

import {Decorator} from 'cerebral-react-baobab'