Common
The place to create local components that are common in the app project.
Last updated
Was this helpful?
The place to create local components that are common in the app project.
Last updated
Was this helpful?
If you are going to create a global component that applies only to the project then you can use this method.
The first step you have to create a component folder in ./src/components/common
. With the file structure as below.
We use aliases for component usage, code as shown below. You can check aliases configs in jsconfig.json
index.js used to place the root function component in which there are props and rendering elements. Here we use override button component with or . You can also create pure components that you want without overriding other component design systems.
style.js used to style the component. Here we use one of the function styles from , namely makeStyles
.