Don't use this
in functional components
This works in preact, but doesn't with react.
This commit is contained in:
parent
5cb38a9830
commit
0a825547a7
2 changed files with 2 additions and 2 deletions
|
@ -60,7 +60,7 @@ function compareBuffers(a, b) {
|
||||||
export default function BufferList(props) {
|
export default function BufferList(props) {
|
||||||
return html`
|
return html`
|
||||||
<ul>
|
<ul>
|
||||||
${Array.from(this.props.buffers.values()).sort(compareBuffers).map(buf => html`
|
${Array.from(props.buffers.values()).sort(compareBuffers).map(buf => html`
|
||||||
<${BufferItem} key=${buf.name} buffer=${buf} onClick=${() => props.onBufferClick(buf.name)} active=${props.activeBuffer == buf.name}/>
|
<${BufferItem} key=${buf.name} buffer=${buf} onClick=${() => props.onBufferClick(buf.name)} active=${props.activeBuffer == buf.name}/>
|
||||||
`)}
|
`)}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -17,7 +17,7 @@ function MemberItem(props) {
|
||||||
export default function MemberList(props) {
|
export default function MemberList(props) {
|
||||||
return html`
|
return html`
|
||||||
<ul>
|
<ul>
|
||||||
${Array.from(this.props.members.entries()).sort().map(([nick, membership]) => html`
|
${Array.from(props.members.entries()).sort().map(([nick, membership]) => html`
|
||||||
<${MemberItem} key=${nick} nick=${nick} membership=${membership} onClick=${() => props.onNickClick(nick)}/>
|
<${MemberItem} key=${nick} nick=${nick} membership=${membership} onClick=${() => props.onNickClick(nick)}/>
|
||||||
`)}
|
`)}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue