Skip to main content

Forceupdatecomponent and reactupdaterequest

forceUpdateComponent Here (https://0x0.st/ipgH.png) you can see react component from settings side with input element corresponding to it . We use el.find('someInputSelector').val(inputVal).trigger('forceUpdateComponent') to update react component state associated to selected input. It means when you need to update input value using jquery then you also need to update react component associated with this input.

reactUpdateRequest We use it when we need update the model. When el.find('someInputSelector').val(inputVal).trigger('reactUpdateRequest') is called it will call appSettings.update() method which updates the model.

Note: We use 'forceUpdateComponent' and 'reactUpdateRequest' in non-reactified components.