How to use the react-cosmos-shared2/url.stringifyUrlQuery function in react-cosmos-shared2

To help you get started, we’ve selected a few react-cosmos-shared2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github react-cosmos / react-cosmos / packages / react-cosmos-playground2 / src / testHelpers / url.ts View on Github external
export function pushUrlParams(params: Params) {
  const query = stringifyUrlQuery(params);
  history.pushState({}, '', `?${query}`);
}
github react-cosmos / react-cosmos / packages / react-cosmos / src / plugins / webpack / client / errorOverlay / reactErrorOverlay.ts View on Github external
function getLaunchEditorUrl(errorLocation: ErrorOverlay.ErrorLocation) {
  return `${LAUNCH_EDITOR_ENDPOINT}?${stringifyUrlQuery({
    filePath: errorLocation.fileName,
    line: errorLocation.lineNumber || 1,
    column: errorLocation.colNumber || 1
  })}`;
}