@wazapp/utils
API
guidFor
API
Example
import Component from "@wazapp/component";
import { guidFor } from '@wazapp/utils'
export default class FormComponent extends Component {
template({ name }) {
return (
<form>
<label htmlFor={guidFor(this, 'title')}>Title</label>
<input id={guidFor(this, 'title')} name="title" />
</form>
);
}
}
// Renders:
// <form>
// <label for="w:1-w2">Title</label>
// <input id="w:1-w2" name="title" />
// </form>uuid
Example
Last updated