This a collection of interesting links found in The Imposter's Handbook by Rob Conery.
Content:
This a collection of interesting links found in The Imposter's Handbook by Rob Conery.
Content:
| function PrivateRoute ({component: Component, authenticated, ...rest}) { | |
| return ( | |
| <Route | |
| {...rest} | |
| render={(props) => authenticated === true | |
| ? <Component {...props} /> | |
| : <Redirect to={{pathname: '/login', state: {from: props.location}}} />} | |
| /> | |
| ) | |
| } |
| # [<tag>] (If applied, this commit will...) <subject> (Max 72 char) | |
| # |<---- Preferably using up to 50 chars --->|<------------------->| | |
| # Example: | |
| # [feat] Implement automated commit messages | |
| # (Optional) Explain why this change is being made | |
| # |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
| # (Optional) Provide links or keys to any relevant tickets, articles or other resources | |
| # Example: Github issue #23 |
| import React from "react" | |
| import { Route, Switch } from "react-router-dom" | |
| const AppRoute = ({ component: Component, layout: Layout, ...rest }) => ( | |
| <Route {...rest} render={props => ( | |
| <Layout> | |
| <Component {...props} /> | |
| </Layout> | |
| )} /> | |
| ) |
| service: name | |
| custom: | |
| staticBucket: static-name.justtim.net | |
| provider: | |
| name: aws | |
| stage: prod | |
| environment: | |
| bucketName: ${self:custom.staticBucket} |
⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates
What this will cover
www.website.com to website.comindex.html)| import React from 'react'; | |
| import PropTypes from 'prop-types' | |
| import debounce from 'lodash.debounce' // or whatevs | |
| import isEqual from 'lodash.isEqual' | |
| class AutoSave extends React.Component { | |
| static contextTypes = { | |
| formik: PropTypes.object | |
| } |
| const AWS = require("aws-sdk"); | |
| const {link} = require("linkfs"); | |
| const mock = require('mock-require'); | |
| const fs = require('fs'); | |
| const tmpDir = require('os').tmpdir(); | |
| exports.handler = (event, context) => { | |
| rewriteFs(); | |
| invokeGatsby(context); | |
| } |