Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React-Keeper是否会提供JSON格式的route配置? #96

Open
tun100 opened this issue Nov 13, 2018 · 2 comments
Open

React-Keeper是否会提供JSON格式的route配置? #96

tun100 opened this issue Nov 13, 2018 · 2 comments

Comments

@tun100
Copy link

tun100 commented Nov 13, 2018

查看一下react-keeper的package.json,可能你们是依赖于react-routerV4的版本,但是能否考虑加入JSON格式类似于V3的router呢

虽然我知道V4的核心思想是路由组件化,而且需要批量生成Route也可以用JSX表达式,但是如果React-Keeper能提供JSON直接定义会更吸引那些喜欢V3的程序员

@lanistor
Copy link
Owner

@LaiHuanMin �是可以支持的,本身Router配置也是一个React的Component,对于Component都可以用React.createElement实现,可以根据JSON使用React.createElement创建一个路由配置,目前来说如果支持的话会需要一个转化类,当然这个转化也可以写在自己的业务代码里。不过这样会失去很多动态路由的便捷性。

@zoro-r
Copy link

zoro-r commented Jul 24, 2019

你好,怎么支持json模式的配置呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants