paint-brush
Math: the React.js Wayby@bitwiselover
9,146 reads
9,146 reads

Math: the React.js Way

by Brandon NewtonNovember 3rd, 2016
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Have you found yourself doing intense <a href="https://hackernoon.com/tagged/math" target="_blank">math</a> problems using weird <a href="https://hackernoon.com/tagged/symbols" target="_blank">symbols</a> like +<em>, </em>−, ÷, and×? Do you enjoy the speed and developer experience of React.js? Thanks to <em>react-real-math </em>you can now harness the power of the React.js Virtual DOM to make your Math blazing🔥 fast!
featured image - Math: the React.js Way
Brandon Newton HackerNoon profile picture

Have you found yourself doing intense math problems using weird symbols like +, −, ÷, and×? Do you enjoy the speed and developer experience of React.js? Thanks to react-real-math you can now harness the power of the React.js Virtual DOM to make your Math blazing🔥 fast!

react-real-math provides an incredibly easy to understand API out of the gate, for free. What a deal! Let’s take a look at an example of react-real-math in action. Consider this old-school almost obfuscated math problem:

1+1×2=?

Incredibly hard to parse. But with react-real-math this is a breeze to understand:

import { computeValue, Multiple, One, Two } from 'react-real-math'





console.log(computeValue(<Multiply by={<Two/>}><One/></Multiply>))

Now that’s what I call 💯💯💯 family. Blazing fast, amazing DX, and great DSL. Not only is this incredibly easy to read, new developers can easily understand what’s going on here. If you would like to contribute to react-real-math please check out the project’s Github:

https://github.com/btnwtn/react-real-math