Open frankcollins3 opened 1 year ago
in react very easy: create string state. can create int state. increase int by one onclick which triggers an effect. the effect runs an expression to gather string value and set string state to be that value.
don't need 2 state but works well either way. [8:26pm]
attempting to do:
@functions { }
now working and serving string data which is created from a randomly generated value from string array.instead of using the:
@ { }
block of code which is serverside C#... how to reinvoke a function from@functions { }
error: stuck as to where to go now
in a react app one could create a state variable and use this function as inline
proposed approach: find a way to store a variable to mimic state and reassign? moments like this show how perfect a concept of: state and useEffect() really is
possible improvements: