Title: Embed React app
Author: pavex
Published: <strong>2018 年 8 月 9 日</strong>
Last modified: 2019 年 2 月 26 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/embed-react-application/assets/icon-256x256.png?rev=1922342)

# Embed React app

 作者：[pavex](https://profiles.wordpress.org/pavex/)

[下载](https://downloads.wordpress.org/plugin/embed-react-application.zip)

 * [详情](https://cn.wordpress.org/plugins/embed-react-application/#description)
 * [评价](https://cn.wordpress.org/plugins/embed-react-application/#reviews)
 * [开发进展](https://cn.wordpress.org/plugins/embed-react-application/#developers)

 [支持](https://wordpress.org/support/plugin/embed-react-application/)

## 描述

This is a simple way how to embed react application in to your post. In my blog,
a wanted include small application, but typical react app is a single page app, 
hardly linked in index.html. He needed a simple way to solve it. The result is visible
on my blog, for example: [Embeding Google Photos album](https://www.publicalbum.org/blog/embedding-google-photos-albums).

### How to do it

You need compiled React app hosted on public url. Find filenames after building 
an application. If you using create-ract-app script, all what you need, find in “
static” directory. Assemble file names into a shortcode like this:

    ```
    [reactapp id="root" js="pathto/static/js/main.000000.js" css="pathto/static/css/main.000000.css"]
    [reactapp id="custom_id" "pathto/static/js/main.000000.js" "pathto/static/css/main.000000.css" "pathto/static/css/another.css"]
    ```

 * id – ID of application root element
 * js[n] – path to Java script bundle
 * css[n] – path to Stylesheet
 * (files are detected automaticly by extension js/css)

That’s all.
 When application was updated, you must setup new links to shortcode.
If you want to more information about this plugin, you may visit [Embedding a React Application to WordPress post](https://www.publicalbum.org/blog/embedding-react-app-wordpress-post)
post in my blog.

#### 1.0.1

_Release Date – 18 January 2019_

 * Multiple script insert for new react build compatibility.

#### 1.0.0

 * React application shortcode.

## 评价

![](https://secure.gravatar.com/avatar/4b1006fbcb45a3d22c3930b4c71d741bc8138f8ce11ba3641209406bb5c00cd9?
s=60&d=retro&r=g)

### 󠀁[Well Done](https://wordpress.org/support/topic/well-done-705/)󠁿

 [heavenhigh027](https://profiles.wordpress.org/heavenhigh027/) 2022 年 5 月 23 
日

Nice work

![](https://secure.gravatar.com/avatar/83d4b1c87f5fd2e3217c7cf7cbf994f7cd2ed7849655cb6df8a2f4ba395cc70a?
s=60&d=retro&r=g)

### 󠀁[Works a charm](https://wordpress.org/support/topic/works-a-charm-17/)󠁿

 [Bizzle Dapp](https://profiles.wordpress.org/bizzledapp/) 2020 年 4 月 16 日 3 
回复

This is a brilliant plugin and works wonderfully.

![](https://secure.gravatar.com/avatar/e2d8f9a4f32bd204196c055ea776fbb46e63652dac5fe88a895de6d20285c783?
s=60&d=retro&r=g)

### 󠀁[Working perfectly](https://wordpress.org/support/topic/working-perfectly-85/)󠁿

 [berdentay](https://profiles.wordpress.org/berdentay/) 2020 年 3 月 28 日

Thanks for this, appreaciate it

![](https://secure.gravatar.com/avatar/b58ff879150b7d800e92efefb8cd9998bd04e9aee977b33e54c716b3d6aa0968?
s=60&d=retro&r=g)

### 󠀁[works](https://wordpress.org/support/topic/works-1598/)󠁿

 [markhorsell](https://profiles.wordpress.org/markhorsell/) 2019 年 8 月 13 日

Thanks

![](https://secure.gravatar.com/avatar/31645687d5cf2e3c63ddce9d02d5b35e25f2bc82901eabd09e7cf2ce490835a7?
s=60&d=retro&r=g)

### 󠀁[good](https://wordpress.org/support/topic/good-4488/)󠁿

 [phuongchi123](https://profiles.wordpress.org/phuongchi123/) 2019 年 5 月 20 日

good

 [ 阅读所有5条评价 ](https://wordpress.org/support/plugin/embed-react-application/reviews/)

## 贡献者及开发者

「Embed React app」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ pavex ](https://profiles.wordpress.org/pavex/)

[帮助将「Embed React app」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/embed-react-application)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/embed-react-application/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/embed-react-application/)，或通过
[RSS](https://plugins.trac.wordpress.org/log/embed-react-application/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/embed-react-application/)。

## 额外信息

 *  版本 **1.0.1**
 *  最后更新：**7 年前**
 *  活跃安装数量 **200+**
 *  WordPress 版本 ** 4.0 或更高版本 **
 *  已测试的最高版本为 **5.1.22**
 *  语言
 * [English (US)](https://wordpress.org/plugins/embed-react-application/)
 * 标签
 * [embed](https://cn.wordpress.org/plugins/tags/embed/)[react](https://cn.wordpress.org/plugins/tags/react/)
 *  [高级视图](https://cn.wordpress.org/plugins/embed-react-application/advanced/)

## 评级

 4.8 星（最高 5 星）。

 *  [  4 条 5 星评价     ](https://wordpress.org/support/plugin/embed-react-application/reviews/?filter=5)
 *  [  1 条 4 星评价     ](https://wordpress.org/support/plugin/embed-react-application/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/embed-react-application/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/embed-react-application/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/embed-react-application/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/embed-react-application/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/embed-react-application/reviews/)

## 贡献者

 *   [ pavex ](https://profiles.wordpress.org/pavex/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/embed-react-application/)