Client side processing and Pega DX API

Hi,

In the Pega Digital Experience and Cosmos UX Design module, it is stated that in order to be DX API compliant, “Visibility expressions must consist of only references to when rules.”. However, as a best practice, expressions can be used to reduce the server side load and do not use rule resolution. What is the main reason why DX API has this requirement?

Kind regards,
Bas

Anyone?

@BasG0629 DX API does not support all client side validation as of now. If you need do client side validation in your React UI then it has to be done on client side.

@BasG0629

Hi,

it’s because when you use DX API, Pega is acting like a server.

Those API just connect pega with your client that must check the json you provide and must render the components.

If you use something like expression, those kind of validations are on client side. So not being on Server, the DX API doesn’t get those rules and for this reason the json doesn’t show the appropriate visibility of the component.

I hope this helps!

Have a nice day,

Daniele

@DanieleD9965 Makes perfect sense! Hence why ShivShaktiK mentioned React validations. Thanks! :slight_smile: