Relative Content

Tag Archive for reactjsnext.jsnextjs14

Trigger server action from select component

I have a server component and I want to submit my select element value to a server action.
is it possible to do that in following setup or do I need a client component for this? thanks

How do I use an html or jsx file (string) from the api with React or NextJS?

I have a NextJS project, admin page is available. On the admin page, there is data from my application and I can edit this data, a data that I can edit is an object related to the home page, htmlBody. I fill this htmlBody value with an html editor (ck editor etc.). But I can only fill html, what I want is to paste a react component into this editor as it is and use it in react. I want to import and use this value from the api. Sorry if I didn’t explain it properly, can you help me please