我是React世界中的一个新人,现在想知道为什么我每次在页面上进行更改时总是始终呈现此代码,所以它始终呈现未更改的组件,例如:
<Grid columns="equal" classname="app" style={{ background: secondaryColor.hex }}>
<ColorPanel
key={currentUser && currentUser.name}
currentUser={currentUser}
/>
<SidePanel
key={currentUser && currentUser.uid}
currentUser={currentUser}
primaryColor={primaryColor}
/>
<Grid.Column style={{ marginLeft: 320 }}>
<Messages
key={currentChannel && currentChannel.id}
currentChannel={currentChannel}
currentUser={currentUser}
isPrivateChannel={isPrivateChannel}
/>
</Grid.Column>
<Grid.Column width={4}>
<MetaPanel
key={currentChannel && currentChannel.name}
userPost={userPost}
currentChannel={currentChannel}
isPrivateChannel={isPrivateChannel}
/>
</Grid.Column>
</Grid>
我对MessagePanel组件进行了更改,然后再次更改了entiry应用程序的渲染。