-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added react structures for notes and tasks
- Loading branch information
acidjunk
committed
Dec 19, 2016
1 parent
4b24f59
commit cb1b092
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') | ||
); |