Gutenberg: How to use RangeControl in the editor itself and make it work?

This happens because the Component need the correct data type. Use “number” when getting the value. Use “String” as the attributes type.

const onChangeValue = ( newValue ) => {
        setAttributes( { value: String(newValue)} )
    }

<RangeControl
 label="Rating"
 value={ Number(attributes.value) }
 onChange={ onChangeValue }
 min={ 1 }
 max={ 10 }
 step={ 0.5 } 
/>