Skip to content

Instantly share code, notes, and snippets.

@tosh
Created March 17, 2021 21:30
Show Gist options
  • Save tosh/ffba29e0d021296fcf983fe62a6fbca5 to your computer and use it in GitHub Desktop.
Save tosh/ffba29e0d021296fcf983fe62a6fbca5 to your computer and use it in GitHub Desktop.
Jam React Component Example
import React from 'react';
import Jam from 'jam-react';
function App() {
let ids = ['01', '02', '03'];
return (
<div style={{padding: '1rem'}}>
<h1>Jam: My own Clubhouse!!!!</h1>
<div>
{ids.map(id => (
<Jam
key={id}
roomId={`new-jam-room-${id}`}
newRoom={{
name: 'A new Jam Room',
description: 'This Room was created by a React component',
color: '#000000',
}}
style={{width: '400px', height: '600px'}}
/>
))}
</div>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment