- Location - The location of the application. Usually just a URL, but the location can contain multiple pieces of information that can be used by an app
- pathname - The "file/directory" portion of the URL, like
invoices/123
- search - The stuff after
?
in a URL like/assignments?showGrades=1
. - query - A parsed version of search, usually an object but not a standard browser feature.
- hash - The
#
portion of the URL. This is not available to servers inrequest.url
so its client only. By default it means which part of the page the user should be scrolled to, but developers use it for various things. - state - Object associated with a location. Think of it like a hidden URL query. It's state you want to keep with a specific location, but you don't want it to be visible in the URL.
- pathname - The "file/directory" portion of the URL, like
This file contains 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
{ | |
"printWidth": 120, | |
"tabWidth": 2, | |
"useTabs": false, | |
"semi": false, | |
"bracketSpacing": false, | |
"jsxBracketSameLine": true, | |
"singleQuote": true, | |
"trailingComma": "none" | |
} |
This file contains 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
process.env.NODE_ENV = 'production' | |
let BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin | |
const webpackConfigProd = require('react-scripts/config/webpack.config.prod') | |
webpackConfigProd.plugins.push( | |
new BundleAnalyzerPlugin({ | |
analyzerMode: 'static', | |
reportFilename: 'report.html' | |
}) |
This file contains 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 { marbles } from "rxjs-marbles/jest"; | |
import { map, startWith, scan } from "rxjs/operators"; | |
import { Subject, merge, of } from "rxjs"; | |
describe("basic", () => { | |
it( | |
"should update state by calling the handler as expected", | |
marbles(m => { | |
const createHandler = () => { | |
const stream$ = new Subject(); |
This file contains 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
const autoprefixer = require('autoprefixer'); | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); | |
const InterpolateHtmlPlugin = require('interpolate-html-plugin'); | |
const eslintFormatter = require('react-dev-utils/eslintFormatter'); | |
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin'); | |
const getClientEnvironment = require('./env'); | |
const paths = require('./paths'); |
This file contains 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
OlderNewer