Question: I have a kafka streams app consuming from kafka topic. It only consumes and processes the data but doesn't produce anything.

For Kafka's exactly\_once processing to work, do you also need your streams app to write to a kafka topic? 

How can you achieve exactly\_once if your streams app wants to process the message only once but not produce anything?

Answer: 
It's because of JavaScript's type coersion. The value that you have in your buttons is in fact a string. So when you try to execute `value + 1`, JavaScript tries to resolve this by first identifying a common data-type (string) before running the calculation. To work around this, simply don't use the value stored in the button and just use the `state` itself.

```
class ButtonReuse extends React.Component {
  constructor(props) {
    super(props)
    this.state = {
      count1: 0,
      count2: 0,
    }
  }

  addOne = (event) => {
    var { target: { name, value } } = event

    this.setState({
        [name] : this.state[name] + 1
    });

    console.log("name: " + name + "\nvalue: " + value)

  }

  render() {
    return (
      <form onSubmit={this.handleSubmit}>
        <label>
          Counter 1: &nbsp;   <div>{this.state.count1}</div>
        <button type="button" name="count1" value={this.state.count1} onClick={this.addOne} >Add One</button>
        </label>
        <br/>
        <label>
          Counter 2: &nbsp;   <div>{this.state.count2}</div>
        <button type="button" name="count2" value={this.state.count2} onClick={this.addOne} >Add One</button>
        </label>
      </form>

```
Looks like a buttons value is always a string. You should not be giving the button a value like this anyways, this is very roundabout. Why not just access the state directly:

```
 addOne = (event) => {
    var { target: { name } } = event

    this.setState({
        [name] : this.state[name] + 1
    });

    console.log("name: " + name + "\nvalue: " + this.state[name])

  }

```

Then you can just remove the value from the buttons. No string conversion necessary.