Skip to content

Commit

Permalink
[docs][xs]: added notes for React developers.
Browse files Browse the repository at this point in the history
  • Loading branch information
anuveyatsu authored Oct 20, 2020
1 parent 51c99ed commit d0e2738
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,16 @@ It would:
* update JS modules in fanstatic

Next, you need to update the template to include correct bundles. In `/templates/datapub/snippets/upload_module.html`, edit the file names of the modules.

Note, if you are developing a React app, e.g., custom `datapub` app, you can use the following attributes passed from the `/templates/datapub/snippets/upload_module.html`:

```html
<div id="ResourceEditor"
data-dataset-id="{{ pkg_name }}"
data-api="{{ base_url }}"
data-lfs="{{ h.extstorage_lfs_url() }}"
data-auth-token="{{ api_key }}"
data-organization-id="{{ h.extstorage_organization_name(pkg_name) }}"
data-resource-id="{{ resource_id }}">
</div>
```

0 comments on commit d0e2738

Please sign in to comment.