We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i have this simple src/pages/options/Options.tsx
src/pages/options/Options.tsx
setResults has no effect in development build, but it works in production build
setResults
probably same issue as #7
import logo from "@assets/img/logo.svg"; import "@src/styles/index.css"; import styles from "./Options.module.css"; import {createSignal} from "solid-js" import {For} from "solid-js" const Options = () => { let searchButton; const [getResults, setResults] = createSignal([ "result0", "result0", ]) setTimeout(() => { // update results console.log("update") setResults((old) => old.concat(["result3"])) setResults((old) => old.concat(["result4"])) }, 1000) function startSearch(event) { event.preventDefault() console.log("submit") searchButton.innerHTML = "Searching..."; searchButton.disabled = true; // clear results console.log("clear") setResults([ "result1", "result2", ]) // update results console.log("update") setResults((old) => old.concat(["result3"])) setResults((old) => old.concat(["result4"])) } return ( <div class={styles.App}> <form class={styles.form} onSubmit={startSearch}> <input/> <button ref={searchButton}>Search</button> </form> <ol class={styles.results}> <For each={getResults()}> {result => ( <li>result: {JSON.stringify(result, null, 2)}</li> )} </For> </ol> <pre>{JSON.stringify(getResults(), null, 2)}</pre> </div> ); }; export default Options;
The text was updated successfully, but these errors were encountered:
yes
Sorry, something went wrong.
No branches or pull requests
i have this simple
src/pages/options/Options.tsx
setResults
has no effect in development build, but it works in production buildprobably same issue as #7
The text was updated successfully, but these errors were encountered: