In the demo app, I want to add a button to Home.js...
# help
j
In the demo app, I want to add a button to Home.js that will create a new note (with predefined parameters) then update the list? What's the best way to do this? I have no issues with creating the new note, but I'm not sure how to reload the list. I cannot call onLoad() from my onClick function because its within the useEffect. https://github.com/serverless-stack/demo-notes-app/blob/main/frontend/src/containers/Home.js
I just added another variable and changed its value within my onClick, then added that new variable to the list here https://github.com/serverless-stack/demo-notes-app/blob/main/frontend/src/containers/Home.js#L32 . Please LMK if there's a better way.
h
if it helps, that is pretty much how i would do it 🙂
f
cc @Jay as he’s more familiar