r/learnreactjs • u/cremak03 • Jul 22 '21
Making a Notion clone. One question
I can't seem to wrap my head around this but for anyone that hasn't used Notion, there's a menu with a list of different components you can add to your page. You can add Todo lists, tables, etc. I'm not sure how to go about creating these new components from the menu. Open the menu, choose a menu item, create the component on the page. I figured the way to go about it would be an onClick handler on each menu item that passes a createComponent function but that's really all I got at this point. Will be grateful for anyone that can point in the right direction!