Documentation
¶
Overview ¶
Package grouter implements GopherJS bindings for react-router.
Index ¶
- func IsActive(props gr.Props, pathOrLoc string) bool
- func Link(to, text string) gr.Modifier
- func MarkIfActive(props gr.Props, pathOrLoc string) gr.Modifier
- func WithHistory(history History) func(*Router) error
- func WithRouter(o *js.Object) *js.Object
- type Components
- type History
- type Route
- type Router
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarkIfActive ¶
MarkIfActive marks by the active CSS class if the given path or location is active or not. If not active, a modifier that does nothing is returned.
func WithHistory ¶
WithHistory is a configuration option to set the history implementation to use.
Types ¶
type Components ¶
Components represents named components for a route.
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
A Route is defined by a path and one or more components. Components can be named. Routes can be nested..
func NewIndexRoute ¶
func NewIndexRoute(components Components) Route
NewIndexRoute defines the route used when the user visits "/". See https://github.com/reactjs/react-router/blob/master/docs/guides/IndexRoutes.md
Click to show internal directories.
Click to hide internal directories.