You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-38Lines changed: 22 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,14 @@
1
1
# react-navtree
2
2
3
-
Utility for making page navigation (using keyboard or TV Remote Control on STB/ Smart TV apps) React way
3
+
Library for making page navigation (using keyboard or TV Remote Control in STB/ Smart TV apps) React way
4
+
5
+
- Lightweight ( 7kb minified, 3 kb gzipped)
6
+
- No dependencies (except for React itself)
4
7
5
8
_This project is under development and is still experimental_
6
9
7
10
> In STB/ Smart TV apps navigation is performed using TV remote control.
8
-
> With traditional approach the navigation logic is implemented globally at the app level and is tightly coupled with UI layout, which doesn't fit with React principles of reusable and independent components.
11
+
> In traditional approach, navigation logic is implemented outside 'View' layer and is tightly coupled with UI layout, which doesn't fit with React principles of reusable and independent components.
9
12
>
10
13
> The idea is to make components' navigation logic encapsulated within themselves and independent of the layout the component is placed into.
11
14
> `react-navtree` was designed to help make navigaton React way - declarative and reusable.
@@ -18,7 +21,7 @@ _This project is under development and is still experimental_
18
21
### Installation
19
22
20
23
```
21
-
npm install react-navtree
24
+
npm install --save react-navtree
22
25
```
23
26
24
27
### Usage example
@@ -64,23 +67,23 @@ class Header extends React.PureComponent {
64
67
}
65
68
66
69
render () {
67
-
return<Nav func={navVertical} className='header'>
70
+
return<Nav className='header'>
68
71
<Nav
69
72
onNav={path=> { if (path) this.setState({ tab: path[0] }) }}
0 commit comments