This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "presets": [ | |
| [ | |
| "env", | |
| { | |
| "modules": false | |
| } | |
| ], | |
| "react" | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react' | |
| import { connect } from 'react-redux' | |
| import { doClearQuery } from './some/file/of/action/creators' | |
| // We again use a simple, functional component. | |
| const OurComponent = ({ query, results, clearQuery }) => ( | |
| <div> | |
| query: {query} | |
| <button onClick={clearQuery}>Clear</button> | |
| <ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 1 | |
| scripts: { | |
| // ... | |
| "precommit": "lint-staged", | |
| "lint-staged-stash": "git stash save --keep-index 'lint-staged' && touch .didstash || rm .didstash || true", | |
| "lint-staged-stash-pop": "test -f .didstash && rm .didstash && git stash pop || true" | |
| }, | |
| "lint-staged": { | |
| "*.js": ["lint-staged-stash", "eslint --fix", "git add", "lint-staged-stash-pop"] | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var callback = (entries, observer) => { | |
| entries.forEach(entry => { | |
| console.log('entry', entry) | |
| // Each entry describes an intersection change for one observed | |
| // target element: | |
| // entry.boundingClientRect | |
| // entry.intersectionRatio | |
| // entry.intersectionRect | |
| // entry.isIntersecting | |
| // entry.rootBounds |
- Website: https://stimulusjs.org/
- GitHub repo: https://github.com/stimulusjs/stimulus
- Handbook: https://stimulusjs.org/handbook/introduction
- Discourse: https://discourse.stimulusjs.org/
initialize: once, when the controller is first instantiatedconnect: anytime the controller is connected to the DOM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Verifying my Blockstack ID is secured with the address 1yEg3gcmHZtHZp2eoFy8UocU3H8dxuKPh https://explorer.blockstack.org/address/1yEg3gcmHZtHZp2eoFy8UocU3H8dxuKPh |
Create an empty git repo or reinitialize an existing one
$ git init