urbit/mar/react-snip.hoon
2015-08-05 19:15:23 -07:00

31 lines
842 B
Plaintext

::
:::: /hoon/core/react-snip/mar
::
/? 314
/+ react
!:
::::
::
|_ [hed=marl tal=marl]
::
++ grow :: convert to
|%
++ mime [/application/json (tact tape)]
++ tape (pojo react-snips-json)
++ elem ;div:(h1:"*{hed}" div:"*{tal}")
++ react-snip-js (crip (react-to-tape elem))
++ react-snips-json
::?> ?=([[%div ~] [[%h1 ~] *] [[%div ~] *] ~]] own) :: xx mystery fish-loop
%^ jobe
head/react-head-json
body/react-snip-json
~
::
++ react-head-json (react-to-json ;h1:"*{hed}")
++ react-snip-json (react-to-json ;div:"*{tal}")
--
++ grab |% :: convert from
++ noun manx :: clam from %noun
++ snip |=(a=[marl marl] a)
-- --