Closed bob2517 closed 2 years ago
This is done offline, but there's a related bug concerning sub-component event scoping so I'm fixing that before I commit the fix for this, just in case it's related.
After all that re-hashing of various things off-line, this was a red-herring. It does actually work. I was placing the rendering in beforeComponentOpen, which is not allowed in ACSS. It works fine in componentOpen. Doh. All changes have been reverted. Closing.
As an aside, I've written an AI version of Tic Tac Toe that will be on the docs site for the new release. I've set it up so the player has average intelligence by adding a few obvious tactics and not a lot of strategy.
I've been playing around with the tic-tac-toe example, testing out various methods of doing things and just discovered this doesn't work properly:
The val="{n}" part is turning reactive, but it only has single quotes and should be a straight render. Whenever n is getting changed, all the prior instances of val="{n}" on the page are changing too, like reactive variables. This is obviously wrong. It works fine when rendering on its own - the error appears only when reactive variables are being rendered in the same string at the same time.