This is an attempt to simplify ZeroNet website creation for react developer. So we can do more cool things !
Note: I am not a react developer. I am discovering the library while starting this project. Feel free to improve the react code.
Create zeronet website and save keys !
Need to add instructions to secure keys.
Start zeronet and access your address (keep it secret it will be your dev environnement).
Clone from github the example project
npm install
We need to recreate the bundle.js file when one of our project file is modified.
gulp
ZeroFrame module allow you to send query to the server to get database information.
First you need to create your dbschema.json and data/users/content.json file. See tutorial : http://127.0.0.1:43110/Blog.ZeroNetwork.bit/?Post:46:ZeroNet+site+development+tutorial+2
You can also check the doc : https://zeronet.readthedocs.io/en/latest/site_development/dbschema_json/
You will also need to modify your root content.json file.
AND DONT FORGET TO SIGN YOUR data/users/content.json (YES, I HAVE LOST MANY HOURS BECAUSE I FORGOT TO DO IT).
Then you can use ZeroFrame API : https://zeronet.readthedocs.io/en/latest/site_development/zeroframe_api_reference/
This API is not only for database queries. See documentation for more information.
Warning: [history] Unable to save state; sessionStorage is not available due to security settings
This bug comes from a react-router dependency ReactTraining/history trying to access the sessionStorage. The only way I can currently think to fix this is to fork the repository and map it through a different namespace as Chrome currently bans anything to do with sessionStorage; even the attempt to override it.