Need to edit the existing NextJS pages created in the App not in builder

@dharmaraju yes! It is possible to add editing regions inside your custom components, you can see a walkthrough here: How to Add Dynamic Editing Regions to Custom Components

Though the coded parts of the component that are outside of the registered inputs or editing regions would not necessarily be editable. So for example, if you are registering a form component with a dynamic editing region, the form itself wouldn’t necessarily be editable, but the dynamic region would be editable and any registered inputs would be dynamic based on the input in builder.

Finally, you absolutely can pass methods and data from your app into builder, as shown in this section of our React SDK documentation. So in your example, if you want to have a component that will fire a modal based on an interaction, you could

  1. Create the element in your code
  2. Register it to Builder with a dynamic editing region
  3. Pass the method click handler to builder within state or context
  4. Within Builder, add a button to the dynamic section
  5. And tie the method to a click action on the button

That being said, if you are passing the click method to Builder, you wouldn’t necessarily even need to add a dynamic editing region within your custom component, as that method would be available to any element on the page from either state or context. It just depends on how exactly you want your pages set up!

Hopefully that helps! As always let me know if you have any further questions!