Support react-refresh and shared client/server types (#98)
- Adds support for react-refresh through `@pmmwh/react-refresh-webpack-plugin`. Updated webpack config to support this. Means entire app is no longer refreshed on changes, only individual components, and state is maintained. - React refresh removes need for `google-apps-script-webpack-dev-server` package - In client code, support for server function autocomplete through use of gas-client 1.0.0. Requires certain files to be typescript .ts files - Remove need for "global" exports in main server file through updated gas-webpack-plugin
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
<a href="" rel="noopener">
|
||||
<img width="400" src="https://i.imgur.com/83Y7bWN.png" alt="React & Google Apps Script logos"></a>
|
||||
</p>
|
||||
<p align="center"><i>
|
||||
Update 2022: Now with support for React v17 and React Fast Refresh
|
||||
</i></p>
|
||||
|
||||
<div align="center">
|
||||
|
||||
@@ -12,7 +15,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<p align="center"> This is your boilerplate project for developing React apps inside Google Sheets, Docs, Forms and Slides projects. It's perfect for personal projects and for publishing complex add-ons in the G Suite Marketplace.
|
||||
<p align="center"> 🚀 This is your boilerplate project for developing React apps inside Google Sheets, Docs, Forms and Slides projects. It's perfect for personal projects and for publishing complex add-ons in the G Suite Marketplace.
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -189,6 +192,8 @@ After running the start command, navigate to your spreadsheet and open one of th
|
||||
|
||||
<img width="100%" src="https://i.imgur.com/EsnOEHP.gif">
|
||||
|
||||
Support for [Fast Refresh](https://github.com/pmmmwh/react-refresh-webpack-plugin) now means that only modified components are refreshed when files are changed, and state is not lost.
|
||||
|
||||
<br/>
|
||||
|
||||
### 🔍 Using React DevTools <a name="dev-tools"></a>
|
||||
|
||||
Reference in New Issue
Block a user