Слабая связность и высокая переиспользуемость представлений + логики
- Высокая переиспользуемость БЛ
Несколько безсвязных фич, могут использовать внутри себя другую фичу со всеми ее вытекающими. Композиция фич на уровнеeffector
- Абстракция БЛ
import { matchPath, RouteProps } from "react-router"; | |
// historyUpdated event is subscribed to history via history.listen or any other way | |
export const createPathMatcher = <Match = unknown>(config: { | |
path: string | string[] | RouteProps; | |
clock?: Event<any> | Store<any> | Effect<any, any>; | |
}) => { | |
return sample({ | |
source: historyUpdated, |
# https://www.zeolearn.com/magazine/setting-caching-headers-for-a-spa-in-nginx-cache | |
server { | |
listen 80; | |
server_name localhost; | |
root /usr/share/nginx/html; | |
# X-Frame-Options is to prevent from clickJacking attack | |
add_header X-Frame-Options SAMEORIGIN; | |
#!/bin/bash | |
# | |
# Inspects branch name and checks if it contains a Jira ticket number (i.e. ABC-123). | |
# If yes, commit message will be automatically prepended with [ABC-123]. | |
# | |
# Useful for looking through git history and relating a commit or group of commits | |
# back to a user story. | |
# |
import { | |
createStore, | |
createEvent, | |
is, | |
clearNode, | |
forward, | |
sample, | |
Store, | |
Event, | |
launch |
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import {createEvent, createStore, createApi, sample, combine} from 'effector' | |
import {useStore} from 'effector-react' | |
const inputStore = createStore('') | |
const todos = createStore([]) | |
const visibilityFilter = createStore(todos => todos) | |
const submit = createEvent('sumbit form') |
import { useEffect, useRef, useCallback } from 'react'; | |
import { createEvent, createStore } from 'effector'; | |
import { useStore } from 'effector-react'; | |
const open = createEvent('open'); | |
const closed = createEvent('closed'); | |
const error = createEvent('error'); | |
const wsStatus = createStore('closed') |
React recently introduced an experimental profiler API. This page gives instructions on how to use this API in a production release of your app.
Table of Contents
React DOM automatically supports profiling in development mode for v16.5+, but since profiling adds some small additional overhead it is opt-in for production mode. This gist explains how to opt-in.
upstream warehouse_inventory { | |
zone inventory_service 64k; | |
server 10.0.0.1:80; | |
server 10.0.0.2:80; | |
server 10.0.0.3:80; | |
} | |
upstream warehouse_pricing { | |
zone pricing_service 64k; | |
server 10.0.0.7:80; |