react_router

Creator: coderz1093

Last updated:

0 purchases

react_router Image
react_router Images
Add to Cart

Description:

react router

React Router #
Dart bindings for react-router. Based off of the comment on this issue

Note: Bindings are incomplete with full react-router, happy to accept prs or issues to add missing implementations

Includes implementations for both react-dart and over_react:
import 'package:react_router/react_dart.dart'; // react_dart bindings
import 'package:react_router/over_react.dart'; // over_react bindings
copied to clipboard
Installing #
Add the following to your pubspec:
dependencies:
react_router:
git:
url: [email protected]:matthewnitschke/react_router_dart.git
ref: master
copied to clipboard
Add the js library for react_router to your html file:
<script src="packages/react_router/react_router.js"></script>
copied to clipboard
Implement the router in your app
import 'packages:react_router/over_react.dart';

void main() {
render(
Router()(
Switch()(
(Route()
..path = 'login'
)(
Login()()
)
),
Switch()(
(Route()
..path = '/'
..exact = true
)(
Home()()
)
)
)
querySelector('#root');
)
}
copied to clipboard
When running, make sure to use webdev_proxy

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.

Related Products

More From This Creator