mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 12:29:06 +01:00
75b9f71d45
The `mounted` state was used to derive state from props before the first render of the Home component. Instead this state is now derived in the constructor, which is also run before the first render. This should behave exactly the same, except now we don't need the `mounted` state or the `deriveStateFromProps` function anymore. The call to `closeCurrentWindow` that was made in `componentDidUpdate` has been moved to the constructor as well. There is no need to delay that call, and this saves us from having to compare current with previous state in that lifecycle function. |
||
---|---|---|
.. | ||
__mocks__ | ||
components | ||
contexts | ||
css | ||
ducks | ||
helpers | ||
hooks | ||
pages | ||
selectors | ||
store | ||
1.INTRODUCTION.stories.mdx | ||
2.DOCUMENTATION.stories.mdx | ||
index.js |