Answer the question
In order to leave comments, you need to log in
How are global methods (functions) stored in React?
Given: React + Redux
Let's say there are n-number of application pages. The main page has a calculator that takes input and produces a result based on that data. Let's say that all the logic of the calculator is a function:
function calc(a,b,c){
return (a * b + c) / 20
}
Answer the question
In order to leave comments, you need to log in
Make out like this
function calc(a,b,c){
return (a * b + c) / 20
}
export default calc;
import calc from '../code/calc'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question