Mentasuave01
Mentasuave01
Explore posts from servers
SSolidJS
Created by Mentasuave01 on 1/21/2024 in #support
Hack to render
I have a signal pValue that takes values on input blur
<input
type="number"
onBlur={(e) => {
setPValue(Number(e.target.value));
console.log(pValue());
setRenderGraph(!renderGraph());
}}
class="stakeAmountInput"
/>
<input
type="number"
onBlur={(e) => {
setPValue(Number(e.target.value));
console.log(pValue());
setRenderGraph(!renderGraph());
}}
class="stakeAmountInput"
/>
it's a prop for a component rendered in the return <Graph P={pValue()}/> This component is not re-render on pValue change, so I did a hack
{renderGraph() && <Graph P={pValue()} />}
{!renderGraph() && pValue() && <Graph P={pValue()} />}

{renderGraph() && <Graph P={pValue()} />}
{!renderGraph() && pValue() && <Graph P={pValue()} />}

It's ugly but it works. Why is happening this and how I can solve it?
14 replies
SSolidJS
Created by Mentasuave01 on 4/12/2023 in #support
one of my dependencies is using "buffer"
Now I can make it work in the browser?
14 replies