A little Web-App I built to easily see scaled item level conversion.
ilvl-calculator.herokuapp.com/?newLevel=150Posted Aug 1, 2018, 5:23 PM UTC
Posted Aug 1, 2018, 5:23 PM UTC
Hey man, this is great! A nice little idea for a web app. As a developer, may I offer one little piece of advice? Since this is a React app I notice you're using state to update the value on the fly, which is perfect. However, if I hit Enter, the form itself actually submits and the page reloads and I wind up losing my result. I see you commented out an onSubmit function. If you want, you can uncomment it out and define the function in the App class like so:
handleSubmit(e) {
e.preventDefault();
}
You'll also wanna put this on your form tag:
onSubmit={this.handleSubmit}
This stops the form itself from actually submitting when you hit enter! Sorry if I'm intruding, and I know you didn't ask for advice, but I just wanted to fly that idea by ya.
Awesome app - I'll definitely use this as I still don't have these translations memorized yet.
Thank you! I actually removed this from my most recent build because it seemed to be extraneous. Definitely don't want that hard refresh though.
Any time! Heck, to be honest you could simply completely remove the <form> element in this particular instance since you're handling everything already. That'd be even easier.
Pushing the fix now - removing the <form> component was definitely the way to go. I'm relatively new to Front End development so it's far from optimal!
Nah it's great overall! If you've ever got any questions feel free to message me - I do a bunch of React development. Best of luck!
THANK YOH