Hi,
I am using react with PCF, ReactDOM.render() method is called from updateView() methods in index file.
The react app(.tsx) accepts different input values and transforms it into the required format. now I need to update this processed value back to CDS(D365). Has someone done this before? I can pass the context to react app and update CDS directly using web API but, I know its not a good approach. I can update data collection as state property and access it from index file, again here I won't get the update event happening in reach app index file. following is my update view method.
public updateView(context: ComponentFramework.Context<IInputs>): void
{
this._props.data =context.parameters.sampleDataSet;
ReactDOM.render(
React.createElement(
App,
this._props
),
this.theContainer
);
}
Please advise the best approach if someone has done this before.
Many thanks in advance.