Skip to content

Commit

Permalink
Use correct createRef from @wordpress/element
Browse files Browse the repository at this point in the history
Was previously using React createRef.

Addresses #16113 (comment)
  • Loading branch information
getdave authored and retrofox committed Aug 2, 2019
1 parent 167fadb commit 68fb82f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-editor/src/components/block-preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import React from 'react';
*/
import { Disabled } from '@wordpress/components';
import { withSelect } from '@wordpress/data';
import { useLayoutEffect, useState } from '@wordpress/element';
import { useLayoutEffect, useState, createRef } from '@wordpress/element';

/**
* Internal dependencies
Expand All @@ -23,7 +23,7 @@ export function BlockPreview( { blocks, settings, srcWidth, srcHeight } ) {
}

// Calculated the destination width.
const previewRef = React.createRef();
const previewRef = createRef();

// Fallback dimensions.
const [ previewDimensions, setPreviewDimensions ] = useState( {
Expand Down

0 comments on commit 68fb82f

Please sign in to comment.