How to use mwp-app-render - 2 common examples

To help you get started, we’ve selected a few mwp-app-render 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 meetup / meetup-web-platform / packages / mwp-app-render / src / components / Dom.jsx View on Github external
const {
		appMarkup = '',
		appContext,
		head,
		initialState = {},
		scripts,
		cssLinks,
	} = props;

	const localeCode = initialState.config.requestLanguage;
	const htmlLang = localeCode.split('-')[0];

	/**
	 * Add polyfill.io script if needed
	 */
	const polyfill = getPolyfill(appContext.userAgent, localeCode);
	const js = polyfill ? [polyfill, ...scripts] : [...scripts];

	/**
	 * `initialState` has untrusted user-generated content that needs to be
	 * written into the DOM inside a 
github meetup / meetup-web-platform / packages / mwp-app-render / src / util / seoHelper.jsx View on Github external
export const generateOrganizationLdJson = (baseUrl, localeCode, route) => {
	const socialLinks = getSocialLinks(localeCode);
	const url = generateCanonicalUrl(baseUrl, localeCode, route);
	return {
		'@type': 'Organization',
		'@context': SCHEMA_ORG,
		url: url,
		name: DEFAULT_TITLE,
		logo: MEETUP_SWARM_LOGO_URL,
		sameAs: [
			socialLinks.facebook,
			socialLinks.twitter,
			socialLinks.youtube,
			socialLinks.googlePlus,
			socialLinks.instagram,
		],
	};
};

mwp-app-render

MWP application rendering tools

MIT
Latest version published 2 years ago

Package Health Score

45 / 100
Full package analysis

Similar packages