sharepointsharepoint-onlineweb-partsspfxpnp-js

Issue using PropertyFieldPeoplePicker target audience control in no JS framework SPFx


I follow the instruction https://pnp.github.io/sp-dev-fx-property-controls/controls/PropertyFieldPeoplePicker/ and setup target audience in React without any issue but it is not working for No JS JS Framework web part. I am getting Failed to load component error. I tried using different version for @pnp/spfx-property-controls in No framework (1.16, 3.8.0-3.11.0) with no luck. Any idea ?

I was expecting to see Target audience working in No JS Framework.


Solution

  • Looks like currently there are some compatibility issues between the latest version of the spfx-property-controls library and the latest version of the SPFx framework that result in the problem you observe. What you could try to do is to use versions that are known to be compatible (previous ones):

    Please note that even if you don't include react explicitly in your package.json, it is included anyway by the property controls library because the library is using react under the hood to render the picker component. The problem you see appears to be related to the recently added support of react version 17.