toggleConnection( id ) {
			const newConnections = connections.map( connection => ( {
				...connection,
				enabled: connection.id === id ? ! connection.enabled : connection.enabled,
			} ) );

			dispatch( 'core/editor' ).editPost( {
				jetpack_publicize_connections: newConnections,
			} );
		}
/**
		 * Toggle connection enable/disable state based on checkbox.
		 *
		 * Saves enable/disable value to connections property in editor
		 * in field 'jetpack_publicize_connections'.
		 *
		 * @param {number}  id ID of the connection being enabled/disabled
		 */
Toggle connection enable/disable state based on checkbox.
Saves enable/disable value to connections property in editor
in field 'jetpack_publicize_connections'.

@param {number}  id ID of the connection being enabled/disabled
Toggle connection enable / disable state based on checkbox . Saves enable / disable value to connections property in editor in field ' jetpack_publicize_connections ' . @param { number } id ID of the connection being enabled / disabled
toggleConnection( id ) {
			const newConnections = connections.map( connection => ( {
				...connection,
				enabled: connection.id === id ? ! connection.enabled : connection.enabled,
			} ) );
			dispatch( 'core/editor' ).editPost( {
				jetpack_publicize_connections: newConnections,
			} );
		}
toggleConnection ( id ) { const newConnections = connections . map ( connection => ( { ... connection , enabled : connection . id === id ? ! connection . enabled : connection . enabled , } ) ) ; dispatch ( 'core/editor' ) . editPost ( { jetpack_publicize_connections : newConnections , } ) ; }
Toggle connection enable/disable state based on checkbox.
Toggle connection enable / disable state based on checkbox .