I use PnPJS within an REST API route like this:
pnp.sp.web.lists.getByTitle("t").reserveListItemId().then(v => {
pnp.sp.web.lists.getByTitle("t").items.add({
ID: v,
Title: v.toString(),
}).then(function (Data) {
// codes
});
})
but utilizing it this way, I can access the current site only.
How can I get access to a list item or create one in a list of a subsite?