Skip to content

Commit

Permalink
Remove the syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed Jun 9, 2023
1 parent e41ad64 commit d6f38be
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 d6f38be

Please sign in to comment.