You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.
currently, the pattern used for setting the React component's state is dangerous because const state = this.state does not clone this.state. it's a reference to the state object, which means when you assign state.loading = false you are mutating the state object directly. we could deeply clone the state object and modify the clone, but what we should really do is usesetState to update just the properties on state we want to update.
@b30wulffz I think it may be better to aim for some other repositories we have (like Template Studio v2). We are planning on replacing template-studio soon, so I may have jumped the gun by labeling this issue as Hacktoberfest.
hi @nik72619c It's not under progress but we aren't pushing more work on template studio at the moment (see news around UX / UI / tooling in Slack from a couple of weeks ago).
There are lots of useful work items on other UI components though! Please check cicero-ui or concerto-ui.
currently, the pattern used for setting the React component's state is dangerous because
const state = this.state
does not clonethis.state
. it's a reference to the state object, which means when you assignstate.loading = false
you are mutating the state object directly. we could deeply clone the state object and modify the clone, but what we should really do is usesetState
to update just the properties on state we want to update.for example, the current code:
would become:
The text was updated successfully, but these errors were encountered: