• Resolved mlinnell

    (@mlinnell)


    Question: What are the risks involved in using react and alpine simultaneously when creating custom gutenberg blocks? Is it recommended?


    Context: My organisation uses react to create custom blocks, but there is one block that would be better written using alpine instead. As such, I’m trying to assess what to be aware of before implementing any changes.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m not sure there is a straight answer to your question. Technically you can use them simultaneously provided you load and init them logically.

    My opinion would be try and avoid adding any new libraries as Gutenberg libraries cover most of the functionality you’ll need and since Gutenberg requires modern browsers, you can likely implement anything missing in modern JavaScript. With that being said some Gutenberg libraries are not yet optimized and imports do introduce unnecessary bloat. It’s your call, but there is nothing stopping you so to speak.

    Thread Starter mlinnell

    (@mlinnell)

    Thanks, Steve. This is helpful to know re: unnecessary bloat + some Gutenberg libraries not yet optimized, as I wasn’t sure what the pitfalls would be of introducing Alpine. We decided not to introduce it for now, as we found a way to do what we wanted via React — but again, thank you! Cheers.

    Thread Starter mlinnell

    (@mlinnell)

    (This is resolved)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Using React and Alpine to Create Custom Gutenberg Blocks’ is closed to new replies.