fbsamples/f8app

Duplicate declaration "value" error

Closed this issue · 2 comments

I'm getting the below error while building app,

error: bundling: TypeError: f8app/js/filter/FilterScreen.ios.js: Duplicate declaration "value"

toggleTopic(topic: string, value: boolean) {
const selectedTopics = { ...this.state.selectedTopics };
const value = !selectedTopics[topic];
if (value) {
selectedTopics[topic] = true;
} else {

Fixed by removing the second parameter of toggleTopic method.

toggleTopic(topic: string) {
    const selectedTopics = { ...this.state.selectedTopics };
    const value = !selectedTopics[topic];
    if (value) {
      selectedTopics[topic] = true;
    } else {
      delete selectedTopics[topic];
    }
    this.setState({ selectedTopics });
  }

This has been fixed via #190.