让我们想象一下,我有几个相关的数据表(当然还有对象):
class Parent {
final int id;
}
class Child {
final int id;
final int parentId;
}
对于父CRUD操作,我将使用推荐的命名约定:
获取/parents -检索所有家长
POST /parents -创建新的父级
获取/父母/: id -检索具有unqique id的父类
使用unqique id更新父/父母/:id
删除/父母亲/: id -删除带有unqique id的父母
对于命名约定,我将使用相同的引用,对子请求使
我有一个表组件,它对第一行、最后一行和奇数对偶数元素具有不同的样式:
import React from 'react';
import { View, Text } from 'react-native';
export const Table = ({ children }) => {
// different style for odd and even elements, first and last rows
let nextChildren = React.Children.toArray(children).filter(chil