Skip to content

Commit

Permalink
Added react structures for notes and tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
acidjunk committed Dec 19, 2016
1 parent 4b24f59 commit cb1b092
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
26 changes: 26 additions & 0 deletions static/react/kanban-app/app/components/Notes.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from 'react';

import uuid from 'uuid';

const notes = [
{
id: uuid.v4(),
task: 'Implement other data structures'
},
{
id: uuid.v4(),
task: 'Use test data from other sources'
},
{
id: uuid.v4(),
task: 'Finish the kanban implementation'
}
];

console.log(notes);

export default () => (
<ul>{notes.map(note =>
<li key={note.id}>{note.task}</li>
)}</ul>
)
4 changes: 3 additions & 1 deletion static/react/kanban-app/app/index.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import React from 'react';
import ReactDOM from 'react-dom';

import Notes from './components/Notes';

if(process.env.NODE_ENV !== 'production') {
React.Perf = require('react-addons-perf');
}

ReactDOM.render(
<div>Hello world</div>,
<Notes />,
document.getElementById('app')
);

0 comments on commit cb1b092

Please sign in to comment.