Похожие чаты

JSON data coming from python server has dashes between key

names like original-img-url. I need to use this data in a nextjs project
Is it good practice to use this, as I would only be able to use the square bracket notation with these key names.
What is the standard being used in nextjs projects ??
How should I do this??

1 ответов

11 просмотров

When it comes to APIs, there are not really any established standards for names. It is just common sense for JS/TS projects to do lowerCamelCase. I'd suggest that if it is a full-stack JS/TS project, I'd pick names that are easy to write in both backend and frontend. Since you probably also need to send data back to the backend, I would not recommend to transform the keys, otherwise you won't be knowing anymore for certain what data you are dealing with at what place.

Похожие вопросы

Карта сайта