- A component always consists of CSS and HTML (JS is optional)
- HTML and JS of a component are located in
ComponentName.js
- Styles of a component are located in
ComponentName.scss
- Each CSS class starts with the unique component name
- The HTML of each component only uses its own prefixed classes
- Components can use other components, but never overwrite their styles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
effect module Api.Manager where { command = MyCmd } exposing (request) | |
import Task exposing (..) | |
import Http | |
import Process | |
import Json.Decode as Json exposing (field) | |
import Native.Api | |
import Json.Decode as Json | |
import Time exposing (Time) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import buzz from '@maxhoffmann/buzz'; | |
function clicks(broadcast) { | |
window.addEventListener('click', broadcast('click')); | |
} | |
const logger = () => console.log; | |
const services = [logger, clicks]; | |
buzz(services); |
made with esnextbin
made with esnextbin
made with esnextbin
made with esnextbin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
effect module TokenRequest where { command = MyCmd } exposing (request) | |
import Task exposing (..) | |
import Http | |
import Process | |
import Json.Decode as Json exposing ((:=)) | |
import Native.Api | |
import Json.Decode as Json | |
import Time exposing (Time) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Api Effect Manager | |
effect module Api where { command = MyCmd } exposing (request, Response) | |
import Task exposing (..) | |
import Http | |
import Process | |
import Json.Decode as Json exposing ((:=)) | |
import Native.Api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html.App as Html | |
import Html exposing (..) | |
import Html.Events exposing (..) | |
import Task | |
import Http | |
import Json.Decode as Json exposing ((:=)) | |
-- Model |
NewerOlder