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
StateUpdater
consider:
const setWith = (setter: StateUpdater<string>) => ({ target: { value } }) => setter(value); function AddUser(this: ApolloMutationElement) { const [mutate, { data, error, loading }] = useMutation(AddUserMutation); const [name, setName] = useState(''); const [twitter, setTwitter] = useState(''); return html` <mwc-textfield label="Name" value="${name}" @input="${setWith(setName)}"></mwc-textfield> <mwc-textfield label="Twitter handle" value="${twitter}" @input="${setWith(setTwitter)}"></mwc-textfield> `; } customElements.define('add-user', component(AddUser));
In cases like these it would be nice to just
import type { StateUpdater } from 'haunted';
The text was updated successfully, but these errors were encountered:
No branches or pull requests
consider:
In cases like these it would be nice to just
The text was updated successfully, but these errors were encountered: