Skip to content

Commit

Permalink
Remove the syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed Jul 26, 2023
1 parent b0e3f20 commit d735be3
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
/**
* WordPress dependencies
*/
import { useState, useEffect } from '@wordpress/element';
import { useState } from '@wordpress/element';

export default function useInternalValue( value ) {
const [ internalValue, setInternalValue ] = useState( value || {} );

// If the value prop changes, update the internal state.
useEffect( () => {
setInternalValue( ( prevValue ) => {
if ( value && value !== prevValue ) {
return value;
}

return prevValue;
} );
}, [ value ] );

const setInternalURLInputValue = ( nextValue ) => {
setInternalValue( {
...internalValue,
Expand Down

0 comments on commit d735be3

Please sign in to comment.