sdkPegaComponentMap as argument instead of import #247
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updated code pertaining to sdkComponentMap to allow passing the sdkPegaComponentMap as an argument. This allows users to either use the Pega provided component map or alternatively (as seen under samples), or provide their own version of a component map. IE: using
React.lazy
or a similar mechanism to lazy-load all or just some components.I don't think this is a fantastic solution, but it at least provides options to the users. In general it would be nice (and also help with bundle splitting and code-readability) if the SDK were more modular.
PR Relates to: #240
[Edit] I previously had something mentioned about AppShell seeming to create a large bundle- after clearing node modules and reinstalling them, that resolves itself. I suspect it was a dependency version mismatch. The Phone component is still quite large- seemingly as a result of material-ui-phone-number.