Skip to content

Instantly share code, notes, and snippets.

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

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

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


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

  • Если вы экспериментируете, то можете взять в качестве стейт-менеджера что угодно. Буквально. Опыт лишним не будет.
# nix-env -p /nix/var/nix/profiles/system --delete-generations old
# nix-collect-garbage -d
# nix-env -p /nix/var/nix/profiles/system --list-generations
## Remove entries from /boot/loader/entries:
# sudo bash -c "cd /boot/loader/entries; ls | grep -v <current-generation-name> | xargs rm"
@SalahAdDin
SalahAdDin / Steps.md
Last active May 29, 2022 06:11
Instlling React-Native Android Environment in ArchLinux

First step: Install Android SDK

  1. yaourt -S android-sdk android-sdk-platform-tools android-sdk-build-tools
    Note: Maybe you'll have problems with the lasta package: ncurses5-compat-libs. In order to avoid this problem you have to use this command: gpg --recv-keys F7E48EDB. You can find clarification here.
  2. yaourt -S genymotion
    Note: You'll need install virtual-box and his modules, yaourt will make for you but you need choos between ArchLinux host modules or DKMS host modules.
  3. Enter in super user mode with su - and then do echo -e "vboxdrv\nvboxnetflt\nvboxnetadp\nvboxpci" > /etc/modules-load.d/virtualbox.conf
    Note: You need do this with super user because need super user permissions and with sudo, for us at least, doesn't work.
  4. sudo modprobe vboxdrv vboxnetadp vboxnetflt
    Activate for current session.
  5. sudo chmod -R 777 /opt/android-sdk
@yesvods
yesvods / gist:51af798dd1e7058625f4
Created August 15, 2015 11:13
Merge Arrays in one with ES6 Array spread
const arr1 = [1,2,3]
const arr2 = [4,5,6]
const arr3 = [...arr1, ...arr2] //arr3 ==> [1,2,3,4,5,6]
@jcgertig
jcgertig / application.css.scss
Created April 14, 2014 00:24
If you change application.css to application.css.scss and remove *= require_tree . then things play nicely
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*