An action describes user intent. It's an object with a type (required) and any sort of date.
Ex:
{
| 'use strict' | |
| // Use entr to auto re-run build - $ ls -d **/* | entr sh -c 'clear; node build.js' | |
| const yaml = require('yaml-js') | |
| const fs = require('fs') | |
| const paths = { | |
| guides: `${__dirname}/data/guides`, | |
| articles: `${__dirname}/data/articles`, |
So, right now I have a landing page that fetches all of my data through an action.
When the user clicks to view a singular item from the landing page (items -> items/:id), should the page component dispatch an action called findItemByID, the reducer do the finding and set a {currentItem: id} object on the root store? You'd essentially have something like:
items: { "items": [], "currentItem": 10, "fetching": false, "fetched": true, "errors": null }How do you handle this flow in Redux? Am I doing it all wrong?
| ; This is an AutoHotKey script designed to be used with Diablo III | |
| ; Pressing F1 will constantly activate skill 1, F2 will activate skill 2, F3 for 3, and F4 for 4 | |
| ; The keys are togglable. | |
| Thread, interrupt, 0 | |
| togF1 := 0 | |
| $F1:: | |
| togF1 := !togF1 | |
| if (togF1) { |
Laravel-Mix is "an elegant wrapper around Webpack for the 80% use case". It has nothing to do with Elixir's Mix and does not require Laravel to work!
Create a new phoenix application with mix phx.new. You may choose to add the --no-brunch flag to stop brunch from being intiailized, but I personally prefer leaving that in and replacing brunch so that the folder structure is set up for me.
$ mix phx.new demo| { | |
| // See https://go.microsoft.com/fwlink/?LinkId=733558 | |
| // for the documentation about the tasks.json format | |
| "version": "2.0.0", | |
| "tasks": [ | |
| // | |
| // Mix Tasks | |
| // | |
| { | |
| "label": "mix.compile (force)", |
| """ | |
| """ https://github.com/JetBrains/ideavim#Files | |
| """ https://gist.github.com/seanwash/b45169cbc5d90868f9f221191d67bec5 | |
| """ | |
| """ | |
| """ Plugins | |
| """ | |
| set surround | |
| set commentary |
| # Aliases | |
| # ---------- | |
| alias ..="cd .." | |
| alias ll="exa --long --header --git -a" | |
| alias n="nvim" | |
| alias c="cd ~/Code" | |
| alias s="cd ~/Code/sidedoor" | |
| alias config="cd ~/.config" | |
| alias bluetooth="sudo pkill bluetoothd" # When bluetooth gets laggy, just kill it. |