MCPcopy Create free account
hub / github.com/SuboptimalEng/coding-tutorials / render

Method render

react-piano/src/components/Piano.js:56–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54 }
55
56 render() {
57 const keys = _.map(NOTES, (note, index) => {
58 return (
59 <Key
60 key={index}
61 note={note}
62 pressedKeys={this.state.pressedKeys}
63 />
64 );
65 });
66
67 const audioFiles = _.map(NOTES, (note, index) => {
68 return (
69 <audio
70 id={note}
71 key={index}
72 src={`../../notes/${note}.mp3`}
73 />
74 );
75 });
76
77 return (
78 <div>
79 <div className="piano">
80 {keys}
81 </div>
82 <div>
83 {audioFiles}
84 </div>
85 </div>
86 );
87 }
88}
89
90export { Piano };

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected