Joe Puzzo
Joe Puzzo
Ok so it seems like the solution to this is this:?? ``` function useStateWithRef(initial) { const ref = useRef(); const [state, setState] = useState(initial); ref.current = state; useEffect( () =>{...
On second thought.. why not just do this?? ``` function useStateWithGetter(initial) { const ref = useRef(); const [state, setState] = useState(initial); ref.current = state; const set = (value) => {...
@gaearon You mentioned this was discussed previously and left it open. Can we start this conversation back up? Or at the very least, verify that the solution above is an...
Just read that article... it basically reassures the solution above would work for adding a getter.
Yup That would do the trick @johnnysprinkles ! I have done that in the past as well. For anyone here that is saying that a getter is not a good...
Hey guys, any updates on this? This new proposed interface looks great. Is there code written for this that I could look at? Also I have a question about the...
Thanks thats fine! I am already using J5 with a teensy LC connected to ras pi to control a stepper motor and its working great! To do this I flashed...
Wow dude this is so cool i had no clue you could do this! But wait you never required `firmata.js` in your example above? is that returired to have those...
Thanks a lot! I got it all working and its awesome! Cant wait to see this become part of J5.
Any updates on this? The workaround i have been using for the past year has been great! No problems there. But it would be nice to see this as part...