I hereby claim:
- I am luisherranz on github.
- I am luisherranz (https://keybase.io/luisherranz) on keybase.
- I have a public key whose fingerprint is 4E60 7D36 842D 08BF C759 32D2 74E4 ECA8 7A7D 3D5F
To claim this, I am signing this object:
import { signal } from '@preact/signals'; | |
const proxyToSignals = new WeakMap(); | |
const objToProxy = new WeakMap(); | |
export const deepSignal = (obj) => new Proxy(obj, handlers); | |
export const options = { returnSignal: /^\$/ }; | |
const handlers = { | |
get(target, prop, receiver) { |
const { server } = require( '@automattic/vip-go' ); | |
const frontity = require( './build/server' ); | |
const myServer = server( frontity ); | |
myServer.listen() |
server { | |
listen 80; | |
listen [::]:80; | |
root /var/www/html; | |
index index.php index.html index.htm; | |
server_name www.domain.io origin.www.domain.io; | |
set $cache_path $request_uri; | |
client_max_body_size 100M; |
<?php | |
$query = new WP_Query(array( | |
'post_type' => 'attachment', | |
'post_status' => 'inherit', | |
'fields' => 'ids', | |
'meta_query' => array( | |
array( | |
'value' => $file, | |
'compare' => 'LIKE', |
I hereby claim:
To claim this, I am signing this object:
I'd got rid of action types and I'd have only actions (action creators). No strings, the function (reference) is used later for comparisons.
export const addTodo = (id, title) => ({ id, title });
export const removeTodo = id => ({ id });
actions({ addTodo, removeTodo }); // Connect it to actions.addTodo & actions.removeTodo.
That's it. They define what your app can do.