Support

Account

Home Forums Gutenberg Can I use JSX for the block template?

Helping

Can I use JSX for the block template?

    • jtnatoli

    • September 28, 2020 at 6:11 am

    I love that I can create blocks with ACF, because creating the editor UI with Gutenberg can be difficult. However, I’d like to program the frontend with JSX. Is it possible to create the template for an ACF block using JS/JSX instead of PHP?

    • uxbox

    • October 14, 2020 at 8:38 am

    Yes – it is possible with wp_localize_script. You can read more about it on Codex page: https://developer.wordpress.org/reference/functions/wp_localize_script/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.