Created
October 2, 2020 09:16
-
-
Save sverhoeven/20bc9f7322cc27f5242e245beba38c45 to your computer and use it in GitHub Desktop.
run-cpp-on-web: react
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function handleSubmit(event) { | |
event.preventDefault(); | |
// Wait for module to initialize, | |
createModule().then(({NewtonRaphson}) => { | |
// Perform computation | |
const newtonraphson = new NewtonRaphson(tolerance); | |
const root = newtonraphson.solve(initial_guess); | |
setRoot(root); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment