I have base code contains many components, and I have many projects depends on the base.
Some projects need to take base component with some customization, so how I can override the react component?
example:
Component A
import React from 'react';
function ComponentA() {
return (
<div className="compnent-A">
{/*render here many components & html structure */}
<div>{ComponetADesc}</div>
{/*render here many components & html structure */}
</div>
);
}
export let ComponetADesc="Hello This is component A"
export default ComponentA;
Component A override
import ComponentA,{ComponetADesc} from './ComponentA'
ComponetADesc="Hello This is component A Overrid"
export default ComponentA
But this code not works, So how I can do that and what is the best way?