signal-desktop/js/react/util/BackboneWrapper.md
Scott Nonnenberg be91a89d68
Parse theme from querystring, put on util. Moment from require()
We also fully set up i18n and put it on util as well as making
it available on windows.i18n for Backbone views.
2018-04-05 08:31:43 -07:00

20 lines
415 B
Markdown

Rendering a real `Whisper.MessageView` using `<util.MessageParents />` and
`<util.BackboneWrapper />`.
```jsx
const model = new Whisper.Message({
type: 'outgoing',
body: 'text',
sent_at: Date.now() - 5000,
})
const View = Whisper.MessageView;
const options = {
model,
};
<util.MessageParents theme={util.theme}>
<util.BackboneWrapper
View={View}
options={options}
/>
</util.MessageParents>
```