These are chat archives for KoryNunn/fastn

8th
Jul 2015
Sholto Maud
@shotlom
Jul 08 2015 01:10
I remember with Gaffa some html elements did not have singleton attributes implemented. E.g. the required element on an <input name="thing" required/>. What's the story with fastn?
fastn('input', {
            name: 'thing',
            required: 'required'
})
?
Kory Nunn
@KoryNunn
Jul 08 2015 01:11
anything you add to the settings object to a generic component will be converted to an attribute or property
fastn('div', {literallyAnything:'foo'}) -> <div literallyAnything="foo"></div>
Sholto Maud
@shotlom
Jul 08 2015 01:15
so for an input element would it be the above or the below or something different?
fastn('input', {
            name: 'thing',
            required
})
Kory Nunn
@KoryNunn
Jul 08 2015 01:16
well, that isn't valid javascript
Sholto Maud
@shotlom
Jul 08 2015 01:16
no that's right
Kory Nunn
@KoryNunn
Jul 08 2015 01:16
fastn('input', {required:'required'})
Sholto Maud
@shotlom
Jul 08 2015 01:16
ok
so the top option
Kory Nunn
@KoryNunn
Jul 08 2015 01:16
however required might have a handy auto-handler..
nope, it doesn't
so yes, do the above
also, don't use 'name'
Sholto Maud
@shotlom
Jul 08 2015 01:26
+1
It would be good to document some of the nuances. I.e. "don't use name".
Kory Nunn
@KoryNunn
Jul 08 2015 01:28
that isn't really anything to do with fastn
You just have no need for name, so don't add it.
Sholto Maud
@shotlom
Jul 08 2015 01:30
k
Sholto Maud
@shotlom
Jul 08 2015 01:43
great. Also works for type:'email' and, type: 'password'.
+1
Kory Nunn
@KoryNunn
Jul 08 2015 01:44
It is automatic, all attributes will work.
Sholto Maud
@shotlom
Jul 08 2015 01:45
+1
= +3
Sholto Maud
@shotlom
Jul 08 2015 04:39
does the example app have it's own repo?
Sholto Maud
@shotlom
Jul 08 2015 04:40
ah! cheers
Kory Nunn
@KoryNunn
Jul 08 2015 04:41
I'll probably change the 'fork me' banner in the app to point there at some stage
also I'd like to give it a proper readme.
Sholto Maud
@shotlom
Jul 08 2015 04:41
Yeah that'd be +1
Kory Nunn
@KoryNunn
Jul 08 2015 07:29
The duplicate value-type list rendering bug is fixed