Requiert les plugins multiCommand et changeLanguageMode.
A rajouter dans le fichier settings.json:
"multiCommand.commands": [
{
"command": "multiCommand.pasteAndFormatJSON",Requiert les plugins multiCommand et changeLanguageMode.
A rajouter dans le fichier settings.json:
"multiCommand.commands": [
{
"command": "multiCommand.pasteAndFormatJSON",| /** | |
| * Custom Jest transformer for SVG files | |
| * Replace SVG file contents by a pseudo <svg /> JSX element containing only a data-filename attribute | |
| * | |
| * To make this work with Jest you need to update your Jest configuration with this: | |
| * "transform": { | |
| * "^.+\\.js$": "babel-jest", | |
| * "^.+\\.svg$": "path/to/svg-transform.js" | |
| * } | |
| * |
| /** | |
| * Custom PropTypes validator for Immutable JS data | |
| * | |
| * This helper performs the following operations | |
| * 1. Check that prop is immutable | |
| * 2. Convert value toJS() then check it against the prop type specs. | |
| */ | |
| import PropTypes from 'prop-types'; | |
| import { isImmutable } from 'immutable'; |
Explains how to install and configure react-storybook into a project created from the react-boilerplate setup.
React-boilerplate (rbp) is a good starting point to create React apps, with a focus on performance, best practices and DX.
The community around the repository is amazing and a constant source of learning.
| const isUnique = (value, index, self) => self.indexOf(value) === index; | |
| const unique = items => items.filter(isUnique); | |
| const mapBy = (items, key) => items.map(item => item[key]); | |
| const uniqueKeys = (items, key) => unique(mapBy(items, key)); | |
| const someKeys = (item, keys) => keys.reduce((result, key) => { | |
| result[key] = item[key]; | |
| return result; | |
| }, {}); |