Skip to content

Instantly share code, notes, and snippets.

View c01nd01r's full-sized avatar

Stanislav c01nd01r

View GitHub Profile
@XaveScor
XaveScor / contextVsStateManager.MD
Last active February 2, 2024 10:57
Context vs StateManager

По мотивам вопросов чатика react.js@telegram

Оффтоп: пожалуйста, не нужно в сотый раз объяснять уже набившую оскомину тему новичку, который задаст подобный вопрос. Просто поделитесь ссылкой на этот текст. С уважением, Андрей @XaveScor Звёздочка


Краткий ответ на этот вопрос, если вы не хотите разбираться детальнее:

  • Если вы экспериментируете, то можете взять в качестве стейт-менеджера что угодно. Буквально. Опыт лишним не будет.

restore

https://effector.now.sh/en/api/effector/restore

Используется тогда, когда необходимо из ивента напрямую выставить значение в стор в обход .on.

Аналог без restore:

const $store = createStore('');
const event = createEvent();
$store.on(event, (_, payload) => payload);
@carestad
carestad / vuejs.amsterdam.2019.slides.md
Last active March 3, 2022 19:07
Collection of slides from #vuejsamsterdam 2019

Day 1

Time Speaker(s) Title
08:45 Evan You State of the Vuenion (Founder of Vue.js)
09:00 Sarah Drasner
Guillaume Chau
Advanced Animations with Vue.JS (Vue.js Core Team)
SSR revolution with Vue 2.6
09:35 Tim Benniks Vue.js for L'oreal, a case study (Director of Frontend @Valtech Paris)
10:45 Jen Looper NativeScript-Vue + ML = The Great MiniBar Challenge: MixoLogy (Developer Advocate at Progress)
11:15 Filip Rakowski Modern Web Apps Performance Tricks with PWA and Vue.js (Founder Vue Storefront)
11:50 Sara Vieira [GraphQL + Apollo + Vue.js =
@nemethmik
nemethmik / main.dart
Created January 19, 2019 07:19
A self-contained runnable Flutter example of using StatefulBuilder to make a wrapper context for Form.of (line 21) to return the parent form (line 11)
import "package:flutter/material.dart";
//https://github.com/flutter/flutter/issues/26772#issuecomment-455674193
main() {runApp(MaterialApp(home:HomeScreen()));}
class HomeScreen extends StatefulWidget {@override createState() {return _HomeScreen();}}
class _HomeScreen extends State<StatefulWidget> {
String data;
final GlobalKey<FormState> formKey = GlobalKey<FormState>();
@override Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("Home")),
@osopolar
osopolar / com.user.time-machine-exclude-node-modules-job.plist
Last active December 20, 2022 08:44 — forked from peterdemartini/command.sh
Exclude node_modules (and more) from timemachine, use launchd to scan the Project directory on a regular basis, for example meanwhile you are having siesta. Put this file in ~/Library/LaunchAgents and call `launchctl load ~/Library/LaunchAgents/com.user.time-machine-exclude-node-modules-job.plist`
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.user.time-machine-exclude-node-modules-job</string>
<key>RunAtLoad</key>
<false/>
<key>KeepAlive</key>
<false/>
@BenSampo
BenSampo / deploy.sh
Last active March 23, 2024 05:30
Laravel deploy script
# Change to the project directory
cd $FORGE_SITE_PATH
# Turn on maintenance mode
php artisan down || true
# Pull the latest changes from the git repository
# git reset --hard
# git clean -df
git pull origin $FORGE_SITE_BRANCH
@elijahmanor
elijahmanor / common-react-bugs.md
Last active May 29, 2019 19:51
Common Bugs when Learning React

Common Bugs when Learning React

The following list tries to summarize some of the things that a developer may encounter while learning React. The list focuses on scenarios that result in actual bugs (things that don't work) or things that cause warnings in the console.

  • using class prop instead of className (for/htmlFor, etc...)
  • trying to set the style prop with a string
  • not having a parent element or fragment
  • not binding (at all or incorrectly)
  • using the wrong lifecycle hook
  • misspelling componentWillReceiveProps
@busypeoples
busypeoples / IntroductionToFlow.md
Last active June 29, 2020 08:22
Introduction To Flow

Introduction To Flow

Intended for developers interested in getting started with Flow. At the end of this introduction, you should have a solid understanding of Flow and how to apply it when building an application.

Covers all the basics needed to get started with Flow.

Covers all the basic needed to get started with Flow and ReactJS.

@ghosh
ghosh / micromodal.css
Last active March 21, 2024 16:12
Demo modal styles for micromodal.js and corresponding expected html. If using this, set the `awaitCloseAnimation` in config to true
/**************************\
Basic Modal Styles
\**************************/
.modal {
font-family: -apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif;
}
.modal__overlay {
position: fixed;