Bohao | Flow (2024-06-25)
[C1.0] What is the best practice to use Array in a view function?
if I want to use
append
in the view
function (which is valid before C1.0), it hints :Impure operation performed in view context
Therefore, some methods have to remove the "view" keyword.3 Replies
I've created a thread for your message. Please continue any relevant discussion in this thread.
You can rename this thread using
/title <new title>
If this is a technical question that others may benefit from, considering also asking it on Stackoverflow: https://stackoverflow.com/questions/ask?tags=onflow-cadenceThis limitation is being tracked in https://github.com/onflow/cadence/issues/3222
Got it, thanks