sibling function triggering
I've been beating my head against the wall and I'm looking for another suggestion.
In sidebar.jsx I have a list of names from a database. In a sibling comonent, main.jsx, I can rename that name in the database.
User clicks name in sidebar, it loads in main's form to rename and submit to database.
I can't seem to get the function that retrieves the list of names from the database to fire when the new name is submitted in main, and updates in the database.
I've tried using props from main to parent to sidebar.
I've tried using createRoot.
I've been putting the watcher in a createEffect in sidebar.
I just can't seem to get the function to re-fetch the database query and reload the list of names in sidebar.
Thoughts/Suggestions/Comments?
In sidebar.jsx I have a list of names from a database. In a sibling comonent, main.jsx, I can rename that name in the database.
User clicks name in sidebar, it loads in main's form to rename and submit to database.
I can't seem to get the function that retrieves the list of names from the database to fire when the new name is submitted in main, and updates in the database.
I've tried using props from main to parent to sidebar.
I've tried using createRoot.
I've been putting the watcher in a createEffect in sidebar.
I just can't seem to get the function to re-fetch the database query and reload the list of names in sidebar.
Thoughts/Suggestions/Comments?
