Openbravo Issue Tracking System - Retail Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0044352 | Retail Modules | Web POS | public | 2020-06-12 09:49 | 2020-06-22 10:57 |
|
Reporter | jarmendariz | |
Assigned To | jarmendariz | |
Priority | urgent | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | RR20Q3 | Fixed in Version | RR20Q3 | |
Merge Request Status | |
Review Assigned To | marvintm |
OBNetwork customer | No |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0044352: State.getState() should not deep-clone the state |
Description | With the new application state, to avoid mutating the state directly, OB.App.State.getState() makes a deep clone of the state persisted in Redux. This is inconvenient for two reasons:
1- This allows developers to mutate the cloned state, which is a bad practice and a bad example that can be followed on actions/action preparations where state must me immutable
2- Deep cloning the whole state may lead to performance issues
For this reason, it is preferable not to clone the state in this function. |
Steps To Reproduce | See above |
Proposed Solution | Remove deep clone in getState function and return the state as-is. |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2020-06-12 09:49 | jarmendariz | New Issue | |
2020-06-12 09:49 | jarmendariz | Assigned To | => jarmendariz |
2020-06-12 09:49 | jarmendariz | OBNetwork customer | => No |
2020-06-12 09:49 | jarmendariz | Triggers an Emergency Pack | => No |
2020-06-12 09:58 | jarmendariz | Status | new => scheduled |
2020-06-12 11:44 | jarmendariz | Review Assigned To | => marvintm |
2020-06-16 12:24 | hgbot | Checkin | |
2020-06-16 12:24 | hgbot | Note Added: 0120861 | |
2020-06-16 12:24 | hgbot | Status | scheduled => resolved |
2020-06-16 12:24 | hgbot | Resolution | open => fixed |
2020-06-16 12:24 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/406cf2e1275915a4a1b3a738e6cafaa1367e67df [^] |
2020-06-17 09:01 | hgbot | Checkin | |
2020-06-17 09:01 | hgbot | Note Added: 0120880 | |
2020-06-22 10:57 | marvintm | Status | resolved => closed |
2020-06-22 10:57 | marvintm | Fixed in Version | => RR20Q3 |