LuisValgoi / ui5-webcomponents-react-seed

Seed of UI5 Web Components for React
12 stars 1 forks source link

Refactor Constants to the Component level #49

Closed isaqueha closed 3 years ago

isaqueha commented 3 years ago

We should move Constants used in each component to the file it is being used, so it's on the same level. This way each variable will be on its context. Example of change for the useRequest hook:

REQUEST: {
    GET: 'get',
    POST: 'get',
    PUT: 'put',
    PATCH: 'patch',
    DELETE: 'delete',
}

For constants that are being used by multiple components, we can keep them all in the Constants.js file.

isaqueha commented 3 years ago

Is this done? We don't need it anymore?

LuisValgoi commented 3 years ago

@isaqueha its done! https://github.com/LuisValgoi/ui5-webcomponents-react-seed/commit/d546e9cb05c1ff1ad1d49b65f3ed4267cdd1395f and here https://github.com/LuisValgoi/ui5-webcomponents-react-seed/commit/50042fb6c72e4ed1728457881862935a087b01e4