reactfire

Value won't change until after the second button press

ε祈祈猫儿з 提交于 2019-12-25 11:34:41
问题 I have a button that changes increases the value of an object. <Button bsStyle="info" bsSize="lg" onClick={this.addKoala}> addKoala: addKoala: function() { this.setState({ towelCount: this.state.towelCount - 2, koalaCount: this.state.koalaCount + 2 }); this.handleClick("Koala"); }, I have two values that are in the same ProgressBar, so when you add to one, you need to take from another. That's why I'm taking 2 away from tokel. it then goes here to be pushed to a firebase backend: handleClick:

Value won't change until after the second button press

巧了我就是萌 提交于 2019-12-25 11:34:09
问题 I have a button that changes increases the value of an object. <Button bsStyle="info" bsSize="lg" onClick={this.addKoala}> addKoala: addKoala: function() { this.setState({ towelCount: this.state.towelCount - 2, koalaCount: this.state.koalaCount + 2 }); this.handleClick("Koala"); }, I have two values that are in the same ProgressBar, so when you add to one, you need to take from another. That's why I'm taking 2 away from tokel. it then goes here to be pushed to a firebase backend: handleClick:

Firebase hosting + React with webpack

风流意气都作罢 提交于 2019-12-03 06:10:08
问题 Is there a way to add Firebase hosting to React project that utilizes webpack? Specifically, I am trying to add it to https://github.com/mxstbr/react-boilerplate This is my firebase.json file { "hosting": { "firebase": "name", "public": "app", "ignore": [ "firebase.json", "**/.*", "**/node_modules/**" ], "rewrites": [ { "source": "**", "destination": "/index.html" } ] } } When I call firebase serve the page is empty. However, if I do npm start the app works correctly. So, the JS/React code is

Firebase hosting + React with webpack

只谈情不闲聊 提交于 2019-12-02 19:36:23
Is there a way to add Firebase hosting to React project that utilizes webpack? Specifically, I am trying to add it to https://github.com/mxstbr/react-boilerplate This is my firebase.json file { "hosting": { "firebase": "name", "public": "app", "ignore": [ "firebase.json", "**/.*", "**/node_modules/**" ], "rewrites": [ { "source": "**", "destination": "/index.html" } ] } } When I call firebase serve the page is empty. However, if I do npm start the app works correctly. So, the JS/React code is not being injected into the index.html, which is <!DOCTYPE html> <html> <head> <meta charset="utf-8">