Skip to main content

There is a demo of all monday.com react components here:

Webpack App


My question is if there is an easy way/tutorial to create a group of items in a reactjs monday.com app that would function exactly like a group of items on a monday.com board?


Or am I approaching this the wrong way? If so, what is the better approach?

Hey @iateadonut 👋


I’d love to clarify this one further! Just to make sure we’re on the same page here, are you looking to create the group with items on a monday.com board by using the mondaySDK and ReactJS as part of a view-based app? For example, a user works on the board by using your Board View app and can create a group with a set of items via click.


For this purpose, you could use the monday.api method to create a group, using the “create_group” mutation, return the group ID, and then use the create_item mutation to create items in that specific group. Does that make sense?


Or are you looking to show a group of items that isn’t part of the board, but exists only within your app?


I’m looking forward to hearing from you soon! 🙂


-Alex


my question is the first part of your reply please go ahead with that.?


Hi @sadaqatem!


Just to be sure we are on the same page here, you have a board view app and want to create a group with some items in it, using the SDK.


Is this accurate?


Exactly, that is what i am asking.


Hello @sadaqatem!


You can use the monday.api method as explained here.


In your case, you will need to first create a group, and then create items in it. It could looks something like this:


monday.api(`
mutation {
create_group(board_id: 1234567890, group_name: "My new group") {
id
}
}
`);

monday.api(`
mutation {
create_item(board_id: 2278381234, item_name: "My new item", group_id: "my_new_group") {
id
}
}
`);

Reply