You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need an example of updating reactive variables based on AJAX response.
A great example is to have a Tic-Tac-Toe bot in the server, which act as a computer opponent which play its move after each user move, until the event of Win/Lose/Tie (which the bot reports also).
The answer of the bot should be based on AJAX, and it should update the reactive variable that hold the state of the game.
The UI should show the board, together with a status message of one of the follows:
Your Move
Waiting for Server Response...
You Won!
You Lost...
It's a Tie!
The server should save the session somehow in-memory(we don't want to have DB in the example), so the state is kept while refreshing, but should then also have a reset button.
The text was updated successfully, but these errors were encountered:
We need an example of updating reactive variables based on AJAX response.
A great example is to have a Tic-Tac-Toe bot in the server, which act as a computer opponent which play its move after each user move, until the event of Win/Lose/Tie (which the bot reports also).
The answer of the bot should be based on AJAX, and it should update the reactive variable that hold the state of the game.
The UI should show the board, together with a status message of one of the follows:
The server should save the session somehow in-memory(we don't want to have DB in the example), so the state is kept while refreshing, but should then also have a reset button.
The text was updated successfully, but these errors were encountered: