I hereby claim:
- I am snoblenet on github.
- I am snoblenet (https://keybase.io/snoblenet) on keybase.
- I have a public key ASCMBay3aYDRi7nJy9DUqfqJSWUfgLj4bTBoESEfFojnUgo
To claim this, I am signing this object:
| node -p "require('node:util').styleText(['bold', 'italic', 'red'], 'This is bold, italic, red text')" |
| // containers/form_container.js | |
| import Form from '../components/form_component'; | |
| export const mapStateToProps = state => ({ username: state.username }); | |
| export default connect(mapStateToProps)(Form); | |
| // components/form_component.js | |
| import PropTypes from 'prop-types'; | |
| import React from 'react'; | |
| const Form = class extends React.Component { |
| // utils/get_prefix.js | |
| export const getPrefix = (lang) => { | |
| if (lang === 'fr') return 'méga'; | |
| return 'mega'; | |
| }; | |
| // utils/prefix_word.js | |
| export const prefixWord = (prefixGetter, wordToPrefix) => prefixGetter() + wordToPrefix; | |
| // spec/fixtures/prefix_fixtures.js |
| // containers/form_container.js | |
| import Form from '../components/form_component'; | |
| // The container passes a 'username' prop (type: string) to Form | |
| export const mapStateToProps = state => ({ username: state.username }); | |
| export connect(mapStateToProps)(Form); | |
| // components/form_component.js | |
| import PropTypes from 'prop-types'; | |
| import React from 'react'; |
| // containers/form_container.js | |
| import Form from '../components/form_component'; | |
| export const mapStateToProps = state => ({ username: state.username }); | |
| export default connect(mapStateToProps)(Form); | |
| // components/form_component.js | |
| import PropTypes from 'prop-types'; | |
| import React from 'react'; |
| // utils/get_prefix.js | |
| // Changed the return value type from string to object | |
| export const getPrefix = () => ({ en: 'mega', fr: 'méga' }); | |
| // utils/prefix_word.js | |
| export const prefixWord = (prefixGetter, wordToPrefix) => prefixGetter() + wordToPrefix; | |
| // spec/utils/get_prefix.js | |
| import getPrefix from '../../utils/get_prefix'; |
| // utils/get_prefix.js | |
| // Changed the return value from 'mega' to 'hyper' | |
| export const getPrefix = () => 'hyper'; | |
| // utils/prefix_word.js | |
| export const prefixWord = (prefixGetter, wordToPrefix) => prefixGetter() + wordToPrefix; | |
| // spec/utils/get_prefix_spec.js | |
| import getPrefix from '../../utils/get_prefix'; |
| // utils/get_prefix.js | |
| export const getPrefix = () => 'mega'; | |
| // utils/prefix_word.js | |
| export const prefixWord = (prefixGetter, wordToPrefix) => prefixGetter() + wordToPrefix; | |
| // spec/utils/get_prefix_spec.js | |
| import getPrefix from '../../utils/get_prefix'; | |
| describe('getPrefix()', => { |
| #!/bin/bash | |
| rm my-code.txt > /dev/null 2>&1 & | |
| rm -rf .git > /dev/null 2>&1 & | |
| touch my-code.txt | |
| git init | |
| git add my-code.txt |
I hereby claim:
To claim this, I am signing this object: