Closed verystack closed 4 years ago
No, just using standard JSON.parse
.
This is probably a stupid question, but how do I enable parsing of it before it hits the state? Right now I’m stringifying it before sending it to Changed() before PushUpdates(), which of course means I have to Parse it after it hits the state. I’m trying to send a nested string list.
You probably need 2 states, one to receive the raw string from the VM, and one connected to the UI that you set when the first state is updated. Use React lifecycle method componentDidUpdate
to do this.
With that said, I generally recommend passing data that your component can readily consume.
Hi Dicky,
Does Dotnetify build in any method for Parsing a JSON message sent from the VM before it goes into the React state?