React¶
bebo-react
A Bebo SDK wrapper for React.js
You can find it here: https://github.com/bebo/bebo-react
Usage¶
Bootstrap your app:
import React from 'react';
import BeboReact from 'bebo-react';
import App from '/path/to/App';
BeboReact.render(
<App />,
document.getElementById('app'), // your app root container
{
disableKeyboardDoneStrip: true // optional, true || false
}
);
Wrap your components:
import React from 'react';
import { withBebo } from 'bebo-react';
class App extends React.Component {
// your component logic
// the Bebo SDK is available via this.props.bebo
render() {
this.props.bebo.callin()
}
}
export default withBebo(App); // this is where the magic happens
That’s all! The wrapper will likely expand as we figure out more common use cases.