通过react-router提供静态内容

时间:2017-06-09 08:37:07

标签: json reactjs react-router

我的$group应用中有一个JavaScript文件,如下所示:

create-react-app

本质上是我在各种组件中使用的JSON对象。现在,我想将JSON对象作为静态内容提供,因为我在其他应用程序之外使用它,以便当我转到export const products = [ { ... 时(我不太关心实际的扩展)我将能够检索数据。我目前在https://myapp.com/products.json

index.js

我想我需要添加新的路线,但是如何?

0 个答案:

没有答案
相关问题