Skip to content

Commit 4e3077f

Browse files
authored
update docs (#113)
1 parent 82564cd commit 4e3077f

20 files changed

+1630
-73
lines changed

website/docs/api/classes/renderer.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
id: "renderer"
3+
title: "Renderer"
4+
sidebar_label: "Renderer"
5+
---
6+
7+
## Hierarchy
8+
9+
* **Renderer**
10+
11+
## Index
12+
13+
### Properties
14+
15+
* [container](renderer.md#static-optional-container)
16+
17+
### Methods
18+
19+
* [forceUpdate](renderer.md#static-forceupdate)
20+
* [render](renderer.md#static-render)
21+
22+
## Properties
23+
24+
### `Static` `Optional` container
25+
26+
**container**? : *ReactReconciler.FiberRoot*
27+
28+
## Methods
29+
30+
### `Static` forceUpdate
31+
32+
**forceUpdate**(): *void*
33+
34+
**Returns:** *void*
35+
36+
___
37+
38+
### `Static` render
39+
40+
**render**(`element`: React.ReactNode, `options?`: [RendererOptions](../globals.md#rendereroptions)): *void*
41+
42+
**Parameters:**
43+
44+
Name | Type |
45+
------ | ------ |
46+
`element` | React.ReactNode |
47+
`options?` | [RendererOptions](../globals.md#rendereroptions) |
48+
49+
**Returns:** *void*

website/docs/api/globals.md

Lines changed: 53 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,17 @@ sidebar_label: "Globals"
66

77
## Index
88

9+
### Classes
10+
11+
* [Renderer](classes/renderer.md)
12+
913
### Interfaces
1014

15+
* [AbstractButtonProps](interfaces/abstractbuttonprops.md)
16+
* [AnimatedImageProps](interfaces/animatedimageprops.md)
1117
* [ButtonProps](interfaces/buttonprops.md)
1218
* [CheckBoxProps](interfaces/checkboxprops.md)
19+
* [ComboBoxProps](interfaces/comboboxprops.md)
1320
* [DialProps](interfaces/dialprops.md)
1421
* [ImageProps](interfaces/imageprops.md)
1522
* [LineEditProps](interfaces/lineeditprops.md)
@@ -25,14 +32,17 @@ sidebar_label: "Globals"
2532
### Type aliases
2633

2734
* [RendererOptions](globals.md#rendereroptions)
35+
* [WidgetEventListeners](globals.md#widgeteventlisteners)
2836

29-
### Functions
37+
### Variables
3038

31-
* [useEventHandler](globals.md#const-useeventhandler)
39+
* [appProxy](globals.md#let-appproxy)
3240

33-
### Object literals
41+
### Functions
3442

35-
* [Renderer](globals.md#const-renderer)
43+
* [hot](globals.md#hot)
44+
* [setAbstractButtonProps](globals.md#setabstractbuttonprops)
45+
* [useEventHandler](globals.md#useeventhandler)
3646

3747
## Type aliases
3848

@@ -42,46 +52,69 @@ sidebar_label: "Globals"
4252

4353
#### Type declaration:
4454

55+
___
56+
57+
### WidgetEventListeners
58+
59+
Ƭ **WidgetEventListeners**: *object*
60+
61+
#### Type declaration:
62+
63+
## Variables
64+
65+
### `Let` appProxy
66+
67+
**appProxy**: *ReactProxyComponent*
68+
4569
## Functions
4670

47-
### `Const` useEventHandler
71+
### hot
4872

49-
**useEventHandler**(`eventHandlerMap`: EventHandlerMap, `deps`: DependencyList): *object*
73+
**hot**(`Component`: React.ComponentType): *React.ComponentType*
5074

5175
**Parameters:**
5276

5377
Name | Type |
5478
------ | ------ |
55-
`eventHandlerMap` | EventHandlerMap |
56-
`deps` | DependencyList |
79+
`Component` | React.ComponentType |
80+
81+
**Returns:** *React.ComponentType*
82+
83+
___
5784

58-
**Returns:** *object*
85+
### setAbstractButtonProps
5986

60-
* \[ **key**: *string*\]: function
87+
**setAbstractButtonProps**<**Signals**>(`widget`: QAbstractButton‹Signals›, `newProps`: [AbstractButtonProps](interfaces/abstractbuttonprops.md)‹Signals›, `oldProps`: [AbstractButtonProps](interfaces/abstractbuttonprops.md)‹Signals›): *void*
6188

62-
▸ (...`args`: any[]): *void*
89+
**Type parameters:**
90+
91+
**Signals**: *QAbstractButtonSignals*
6392

6493
**Parameters:**
6594

6695
Name | Type |
6796
------ | ------ |
68-
`...args` | any[] |
97+
`widget` | QAbstractButton‹Signals› |
98+
`newProps` | [AbstractButtonProps](interfaces/abstractbuttonprops.md)‹Signals› |
99+
`oldProps` | [AbstractButtonProps](interfaces/abstractbuttonprops.md)‹Signals› |
100+
101+
**Returns:** *void*
69102

70-
## Object literals
103+
___
71104

72-
### `Const` Renderer
105+
### useEventHandler
73106

74-
### **Renderer**: *object*
107+
**useEventHandler**<**Signals**>(`eventHandlerMap`: Partial‹[WidgetEventListeners](globals.md#widgeteventlisteners) | Signals›, `deps`: DependencyList): *object | object*
75108

76-
### render
109+
**Type parameters:**
77110

78-
**render**(`element`: React.ReactNode, `options?`: [RendererOptions](globals.md#rendereroptions)): *void*
111+
**Signals**
79112

80113
**Parameters:**
81114

82115
Name | Type |
83116
------ | ------ |
84-
`element` | React.ReactNode |
85-
`options?` | [RendererOptions](globals.md#rendereroptions) |
117+
`eventHandlerMap` | Partial‹[WidgetEventListeners](globals.md#widgeteventlisteners) &#124; Signals› |
118+
`deps` | DependencyList |
86119

87-
**Returns:** *void*
120+
**Returns:** *object | object*

website/docs/api/index.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
---
2+
id: "index"
3+
title: "@nodegui/react-nodegui"
4+
sidebar_label: "README"
5+
---
6+
7+
# React NodeGUI
8+
9+
[![Join the NodeGUI community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/nodegui)
10+
[![All Contributors](https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square)](#contributors)
11+
12+
Build **performant**, **native** and **cross-platform** desktop applications with React.🚀
13+
14+
React NodeGUI is powered by **React** ⚛️ and **Qt5** 💚 which makes it CPU and memory efficient as compared to other chromium based solutions like electron. React NodeGUI is essentially a React renderer for [NodeGUI](https://github.com/nodegui/nodegui).
15+
16+
Visit: https://react.nodegui.org for docs.
17+
18+
<img alt="logo" src="https://github.com/nodegui/nodegui/raw/master/extras/logo/nodegui.png" height="200" />
19+
20+
> This project is in active development. It should be okay for smaller projects but anything complex - electron is the way to go for now. 🚧
21+
22+
## How does it look?
23+
24+
<div style="display:inline; margin: 0 auto;">
25+
<img alt="demo_linux" src="https://github.com/nodegui/examples/raw/master/react-nodegui/calculator/calculator_linux.png" height="280" />
26+
<img alt="demo_win" src="https://github.com/nodegui/examples/raw/master/react-nodegui/calculator/calculator_win.jpg" height="280" />
27+
<img alt="demo_mac" src="https://github.com/nodegui/examples/raw/master/react-nodegui/calculator/calculator_mac.png" height="280" />
28+
</div>
29+
30+
<div style="display:inline; margin: 0 auto;"><img alt="kitchen" src="https://github.com/nodegui/nodegui/raw/master/extras/assets/kitchen.png" height="280" /><img alt="demo_mac" src="https://github.com/nodegui/examples/raw/master/react-nodegui/weather-app-widget/weather_widget_mac.png" height="280" /><img alt="demo_win" src="https://github.com/nodegui/examples/raw/master/react-nodegui/image-view/image_view_win.jpg" height="280" />
31+
</div>
32+
33+
**More screenshots?**
34+
35+
[See examples](https://github.com/nodegui/react-nodegui/tree/master/examples/)
36+
37+
## Features
38+
39+
- 🧬 Cross platform. Should work on major Linux flavours, Windows and MacOS
40+
- 📉 Low CPU and memory footprint. Current CPU stays at 0% on idle and memory usage is under 20mb for a hello world program.
41+
- 💅 Styling with CSS (includes actual cascading). Also has full support for Flexbox layout (thanks to Yoga).
42+
- ✅ Complete Nodejs api support (Currently runs on Node v12.x - and is easily upgradable). Hence has access to all nodejs compatible npm modules.
43+
- 🎪 Native widget event listener support. supports all event available from Qt / NodeJs.
44+
- 💸 Can be used for Commercial applications.
45+
- 🕵️‍♂️ Good Devtools support (supports react-devtools, node debugger).
46+
- 📚 Good documentation and website.
47+
- 🧙‍♂️ Good documentation for contributors.
48+
- 🦹🏻‍♀️ Good support for dark mode (Thanks to QT).
49+
- 🏅First class Typescript support. (Works on regular JS projects too 😉).
50+
51+
## Getting Started
52+
53+
- Check out [react-nodegui-starter](https://github.com/nodegui/react-nodegui-starter) to get up and running with your own React NodeGUI app!
54+
- Read through the [docs](https://react.nodegui.org)
55+
56+
**Community Guides**
57+
58+
- https://blog.logrocket.com/electron-alternatives-exploring-nodegui-and-react-nodegui/ - Electron alternatives: Exploring NodeGUI and React NodeGUI by [Siegfried Grimbeek](https://blog.logrocket.com/author/siegfriedgrimbeek/).
59+
60+
**Talks/Podcasts**
61+
62+
- [NodeGui and React NodeGui at KarmaJS Nov 2019 meetup: https://www.youtube.com/watch?v=8jH5gaEEDv4](https://www.youtube.com/watch?v=8jH5gaEEDv4)
63+
64+
- <audio data-theme="night" data-src="https://changelog.com/jsparty/96/embed" src="https://cdn.changelog.com/uploads/jsparty/96/js-party-96.mp3" preload="none" class="changelog-episode" controls></audio><p><a href="https://changelog.com/jsparty/96">JS Party 96: Performant Node desktop apps with NodeGUI</a> – Listen on <a href="https://changelog.com/">Changelog.com</a></p>
65+
66+
## Docs for contributing
67+
68+
Looking to contribute? If you wish to implement a new widget/add more features and need help understanding the codebase. You can start here:
69+
70+
Contributing developer docs link:
71+
72+
https://github.com/nodegui/nodegui/tree/master/website/docs/development
73+
74+
Please read: https://github.com/nodegui/.github/blob/master/CONTRIBUTING.md
75+
76+
## Building
77+
78+
`npm run build [--qt_home_dir=/path/to/qt]`
79+
80+
## Funding
81+
82+
React NodeGUI is an open source project and requires your support. If you like this project, please consider supporting my work by clicking on the sponsor button on this Github repo or via Ko-Fi. Alternatively, Issues on React NodeGui can be funded by anyone via Issuehunt and the amount will be distributed to respective contributors.
83+
84+
<p>
85+
<a href='https://ko-fi.com/E1E510AV9' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi4.png?v=2' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a> &nbsp; &nbsp;
86+
<a href="https://issuehunt.io/r/nodegui/react-nodegui"><img alt="issuehunt" src="https://github.com/BoostIO/issuehunt-materials/raw/master/v1/issuehunt-button-v1.svg?sanitize=true" height="36px" /></a>
87+
</p>
88+
89+
## Special Thanks
90+
91+
- [Logo: Thanks to Vishwas Shetty from the Noun Project.](https://github.com/nodegui/nodegui/blob/master/extras/legal/logo/thanks.md)
92+
93+
## Code of Conduct
94+
95+
https://github.com/nodegui/.github/blob/master/CODE_OF_CONDUCT.md
96+
97+
## License
98+
99+
MIT
100+
101+
## Maintainers ✨
102+
103+
People maintaining this project.
104+
105+
<!-- prettier-ignore -->
106+
<table>
107+
<tr>
108+
<td align="center"><a href="https://blog.atulr.com"><img src="https://avatars2.githubusercontent.com/u/4029423?v=4" width="100px;" alt="Atul R"/><br /><sub><b>Atul R</b></sub></a></td>
109+
</tr>
110+
</table>
111+
112+
## Contributors ✨
113+
114+
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
115+
116+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
117+
<!-- prettier-ignore -->
118+
<table>
119+
<tr>
120+
<td align="center"><a href="http://rahulgaba.com"><img src="https://avatars3.githubusercontent.com/u/7898942?v=4" width="100px;" alt="Rahul Gaba"/><br /><sub><b>Rahul Gaba</b></sub></a><br /><a href="https://github.com/nodegui/react-nodegui/commits?author=rgabs" title="Code">💻</a></td>
121+
<td align="center"><a href="https://github.com/kakulgupta"><img src="https://avatars3.githubusercontent.com/u/10727047?v=4" width="100px;" alt="Kakul Gupta"/><br /><sub><b>Kakul Gupta</b></sub></a><br /><a href="https://github.com/nodegui/react-nodegui/commits?author=kakulgupta" title="Code">💻</a></td>
122+
<td align="center"><a href="https://github.com/Nicify"><img src="https://avatars3.githubusercontent.com/u/24217275?v=4" width="100px;" alt="Eva1ent"/><br /><sub><b>Eva1ent</b></sub></a><br /><a href="https://github.com/nodegui/react-nodegui/commits?author=Nicify" title="Code">💻</a></td>
123+
<td align="center"><a href="https://github.com/slidinghotdog"><img src="https://avatars3.githubusercontent.com/u/33790211?v=4" width="100px;" alt="slidinghotdog"/><br /><sub><b>slidinghotdog</b></sub></a><br /><a href="https://github.com/nodegui/react-nodegui/commits?author=slidinghotdog" title="Code">💻</a></td>
124+
<td align="center"><a href="https://www.linkedin.com/in/roysommer/"><img src="https://avatars2.githubusercontent.com/u/6681893?v=4" width="100px;" alt="Roy Sommer"/><br /><sub><b>Roy Sommer</b></sub></a><br /><a href="https://github.com/nodegui/react-nodegui/commits?author=illBeRoy" title="Code">💻</a></td>
125+
<td align="center"><a href="https://github.com/nateshmbhat"><img src="https://avatars1.githubusercontent.com/u/23279926?v=4" width="100px;" alt="Natesh M Bhat"/><br /><sub><b>Natesh M Bhat</b></sub></a><br /><a href="https://github.com/nodegui/react-nodegui/commits?author=nateshmbhat" title="Documentation">📖</a></td>
126+
<td align="center"><a href="https://www.greatapes.fi"><img src="https://avatars3.githubusercontent.com/u/3404389?v=4" width="100px;" alt="Mikko Sairio"/><br /><sub><b>Mikko Sairio</b></sub></a><br /><a href="https://github.com/nodegui/react-nodegui/commits?author=msairio" title="Code">💻</a></td>
127+
</tr>
128+
</table>
129+
130+
<!-- ALL-CONTRIBUTORS-LIST:END -->
131+
132+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

0 commit comments

Comments
 (0)