Skip to content

Commit 03f7b05

Browse files
committed
Update README.
1 parent 2916eb0 commit 03f7b05

File tree

2 files changed

+27
-38
lines changed

2 files changed

+27
-38
lines changed

README.md

Lines changed: 26 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Getting Started with Create React App
1+
# react-retool
22

3-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
3+
A React wrapper for embedding Retool apps.
44

55
## Available Scripts
66

@@ -19,52 +19,41 @@ You will also see any lint errors in the console.
1919
Launches the test runner in the interactive watch mode.\
2020
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
2121

22-
### `yarn build`
22+
### `yarn publish:npm`
2323

24-
Builds the app for production to the `build` folder.\
25-
It correctly bundles React in production mode and optimizes the build for the best performance.
24+
Builds the project in the `/dist` directory. Publish with `npm publish`.
2625

27-
The build is minified and the filenames include the hashes.\
28-
Your app is ready to be deployed!
26+
## Install
2927

30-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
28+
```
29+
// with npm
30+
$ npm install react-retool --save
3131
32-
### `yarn eject`
32+
// with yarn
33+
$ yarn add react-retool
34+
```
3335

34-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
3536

36-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37+
## Usage
3738

38-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
39+
```
40+
import Retool from 'react-retool';
3941
40-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
42+
function App() {
43+
return (
44+
<Retool url="https://retoolin.tryretool.com/embedded/public/f7607e1f-670a-4ebf-9a09-be54cf17181e"/>
45+
);
46+
}
4147
42-
## Learn More
48+
export default App;
49+
```
4350

44-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
51+
### Options
52+
`<Retool>` expects a `url` prop pointing to an embedded Retool application. You can generate this URL in the editor mode of a Retool app by clicking "Share" then "Public".
4553

46-
To learn React, check out the [React documentation](https://reactjs.org/).
4754

48-
### Code Splitting
55+
### Example
4956

50-
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
57+
Running `yarn start` will start an application with a basic Retool app embeded.
5158

52-
### Analyzing the Bundle Size
53-
54-
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55-
56-
### Making a Progressive Web App
57-
58-
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59-
60-
### Advanced Configuration
61-
62-
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63-
64-
### Deployment
65-
66-
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67-
68-
### `yarn build` fails to minify
69-
70-
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
59+
There is a live example here: [https://react-retool.surge.sh](https://react-retool.surge.sh)

src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import logo from './logo.svg';
1+
22
import './App.css';
33
import Retool from './components/Retool'
44

0 commit comments

Comments
 (0)