gui
Explore posts from serversHow to rerender children whenever a signal changes?
Hey there! I'm really new to Solid, so I built a tic-tac-toe game to understand more about it. I got it working having everything written in a single component. After that I wanted to extract part of the code to a new component called
Board
. However, after doing this, I realized that everything inside the Board
component wasn't being rerendered when the squares
signal changes. How can we make it rerender on changes to the signal? Is there a something similar to "createEffect" for components?
Here is the source code: https://github.com/ubmit/tic-tac-toe-solid/blob/main/src/App.tsx
Thanks!
PS.: here is the previous commit, before the Board
component was created, and when it was still working well https://github.com/ubmit/tic-tac-toe-solid/blob/8b5dd824b58c1cd3a671a23b5583e6d7a2dc69dc/src/App.tsx9 replies
TTCTheo's Typesafe Cult
•Created by gui on 5/15/2023 in #questions
How can I get the input field values from formData (using Next form action)
I’m probably missing something here, but I thought that
formData.get(inputId)
would work 🫠
Here’s is the code from a basic form I’ve just written to play around:
3 replies
TTCTheo's Typesafe Cult
•Created by gui on 2/7/2023 in #questions
Not being able to render my React app
I don't why but I felt like trying to setup a minimal React setup using Babel. I created the HTML and added both the
Here is the repo: https://github.com/ubmit/barebones-react-experiment
script
tag to load the output from babel and the div
with id root to be used as the entrypoint for React. However, things aren't working somehow 🫠 The JS is being loaded by the browser but nothing is rendered somehow.
It seems like I missed something simple that I'm not being able to spot. Can someone help me finding it, please? 
4 replies
TTCTheo's Typesafe Cult
•Created by gui on 9/24/2022 in #questions
How could I improve this code?
I wrote this code and even though it works I feel like there should be an easier and better way to write it that I simply don't know how.
The main part I think could be improved is the
findSportEvents
function? Could someone review it please? 🙏
https://www.typescriptlang.org/play?#code/C4TwDgpgBAymD2AnYBRAbhAdsKBeKA3gFBRSYCGAthAFxQDOwiAlpgOYDcJUiE9ArgBtgdRi3ZcAvlyIBjeJkawACgHkASgBUA+igBqKAHKaYdAIKJE5EAB44SVBmwA+PFADa3AmSq0oAcjMoNHooACF-ABoePiERAIBGAFoABn8oSUivH2o6fwBhYNCAESiYgWE85IAWdMzsilyAlCKoADEy3gr4-2qk2oysgF0ZADN+TFlgZgUYjGQYJl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