DEV Community

Discussion on: Namespaces and Javascript: I Don’t Know What I’m Doing

Collapse
 
anduser96 profile image
Andrei Gatej

I’m sorry, now that I look twice, my answer is pretty misleading.

But just to finish my idea:
const addPost = ‘post/add’
You could define this as an obj prop:
{
addPost { ...}
}

Anyway, it doesn’t seem to be practical. There are definitely better ways that have already been mentioned.