applerdotxyz / rn-composable-ui

react-native, starter-kit, template, multi-platform, expo, web, mobile, ios, android
https://liveedit.vercel.app
Mozilla Public License 2.0
1 stars 4 forks source link

setAppState is not replacing the whole object instead just updating the field in the AppState Object #65

Open subhamtsd opened 3 years ago

subhamtsd commented 3 years ago

First I updated appState by following object { "status": "SUCCESS", "lockId": "1", "createTs": "2020-11-26 10:50:33", "createUser": "RESTCALL", "modifyTs": "2020-11-26 10:50:33", "modifyUser": "RESTCALL", "categoryKey": "null", "languageKey": "1", "catalogKey": "null", "sequence": "0", "active": "true", "categoryCode": "Architect", "displayName": "Architect", "longDescription": "Architect", "shortDescription": "Architect", "isTop": "false", "parentCategories": [], "childCategories": [] }

Then I updated the setAppState with different object :

{ "status": "SUCCESS", "lockId": "1", "createTs": "2020-08-26 13:00:42", "createUser": "RESTCALL", "modifyTs": "2020-08-26 13:00:42", "modifyUser": "RESTCALL", "productKey": "112264302", "languageKey": "1", "active": "true", "productCode": "LawnTennis", "saleCodePrefix": "VATIKALAMPS", "buyable": "true", "launchDate": "null", "availabilityDate": "null", "decommissionDate": "null", "taxCategoryKey": "0", "displayName": "Lawn Tennis", "shortDescription": "Lawn Tennis", "longDescription": "Lawn Tennis", "brandKeys": [], "parentCategories": [], "childCategories": [] }

Here the AppState Value in the Json is Something like this Not replacing the whole object instead just updating the field in the AppState Object

{ "selectedRowKey": { "status": "SUCCESS", "lockId": "1", "createTs": "2020-08-26 13:00:42", "createUser": "RESTCALL", "modifyTs": "2020-08-26 13:00:42", "modifyUser": "RESTCALL", "categoryKey": "null", "languageKey": "1", "catalogKey": "null", "sequence": "0", "active": "true", "categoryCode": "Architect", "displayName": "Lawn Tennis", "longDescription": "Lawn Tennis", "shortDescription": "Lawn Tennis", "isTop": "false", "parentCategories": [], "childCategories": [], "productKey": "112264302", "productCode": "LawnTennis", "saleCodePrefix": "VATIKALAMPS", "buyable": "true", "launchDate": "null", "availabilityDate": "null", "decommissionDate": "null", "taxCategoryKey": "0", "brandKeys": [] } }

subhamtsd commented 3 years ago

Hi @saurshaz

I have added a description for the bug.