Well, I'd wish for Dates to just automatically come over first. :)

On Monday, August 22, 2016 at 10:50:39 AM UTC-5, OvermindDL1 wrote:
>
> I use the method of two records, one that comes in the port and one after 
> massaging it into the better format at the subscription step.  It is ugly 
> but I do not really see a way around it without being able to somehow 
> define our own Encoders/Decoders for ports (which I wish!).
>
>
> On Monday, August 22, 2016 at 9:22:06 AM UTC-6, Kasey Speakman wrote:
>>
>> If I have a record with a Date field, and I need to receive that through 
>> a port (which I understand is not possible). Do I have to de/code the whole 
>> record just because of this or is there a better way?
>>
>> Another way that occurs to me is to create two records, one with the date 
>> as a string for going through the port. Then once it gets inside Elm, use 
>> Date.fromString and map to the actual record type. Seems only slightly 
>> better than de/coding.
>>
>> Thoughts?
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to