(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
<?php | |
/** | |
* Sync Groups from WordPress to Discourse | |
* | |
* First creates 'groups' meta_key (which should be customized to your needs) | |
* Then it monitors for changes in the 'groups' meta_value and connects to Discourse API to sync groups | |
* | |
* WordPress References | |
* https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/meta.php?order=name#L235 | |
* http://wordpress.stackexchange.com/questions/16835/how-to-hook-update-post-meta-and-delete-post-meta |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This document is a collection of concepts and strategies to make large Elm projects modular and extensible.
We will start by thinking about the structure of signals in our program. Broadly speaking, your application state should live in one big foldp
. You will probably merge
a bunch of input signals into a single stream of updates. This sounds a bit crazy at first, but it is in the same ballpark as Om or Facebook's Flux. There are a couple major benefits to having a centralized home for your application state:
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
import Html exposing (..) | |
import Keyboard | |
import Window exposing (Size) | |
import AnimationFrame | |
import Task | |
import Html.App as App | |
import Collage exposing (..) | |
import Element exposing (..) |
{- | |
Define your own elm-ui Element that works with Safari AR Quicklook feature on iOS 12+ | |
The problem with the standard Element nodes is that Safari wants the <a> node to only have | |
a single child and that needs to be an <img> | |
-} | |
usdz : List (Attribute Msg) -> { usdzUrl : String, imgUrl : String } -> Element Msg | |
usdz attrs rec = | |
link | |
( htmlAttribute (Html.Attributes.attribute "rel" "ar") |