I've moved all my static text to the constants file and I've to pass user's first name and last name to one particular key. I've tried using string literal but its not working. Is there any way to pass the values from react to the constants file.
constants.js
export constants={
'employeeName': `Hello welcome ${employee.firstname}, ${employee.lastname}`
}
React component
import constants from './constants.js'
const employee={
firstname:props.firstname,
lastname: props.lasname
}
<div>{constants.employeeName}</div>