Using the example given for React-Bootstrap and react.rb works perfectly but I am trying to get a NPN component called React-TimeAgo working and I am lost.
This is what I have done:
In index.js (for Webpack to import it into the webpack bundle):
window.bs = require('react-bootstrap')
window.timeago = require('react-timeago')
In the actual component.rb I have this:
class Rb < React::NativeLibrary
imports 'bs'
end
class TimeAgo < React::NativeLibrary
imports 'timeago'
end
Then referencing the Bootstrap components work perfectly:
Rb.Button(bsStyle: :primary) <- works as expected
But I am not managing to get anything out of the TimeAgo wrapper:
TimeAgo.new(date: "Aug 29, 2014") {} <- just does nothing
TimeAgo(date: "Aug 29, 2014") {} <- method undefined
What am I doing wrong? All help appreciated!