{"id":24072638,"url":"https://github.com/onaio/gisida-react","last_synced_at":"2025-04-28T15:09:59.797Z","repository":{"id":46708760,"uuid":"107155764","full_name":"onaio/gisida-react","owner":"onaio","description":"React Dashboard library for Gisida.","archived":false,"fork":false,"pushed_at":"2021-10-15T09:45:11.000Z","size":53619,"stargazers_count":3,"open_issues_count":19,"forks_count":2,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-04-28T15:02:24.018Z","etag":null,"topics":["dashboard","data","gisida","map","react","visualization"],"latest_commit_sha":null,"homepage":"http://gisida.onalabs.org/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onaio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-16T16:45:49.000Z","updated_at":"2024-12-01T08:53:33.000Z","dependencies_parsed_at":"2022-09-12T15:53:18.765Z","dependency_job_id":null,"html_url":"https://github.com/onaio/gisida-react","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onaio%2Fgisida-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onaio%2Fgisida-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onaio%2Fgisida-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onaio%2Fgisida-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onaio","download_url":"https://codeload.github.com/onaio/gisida-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251336390,"owners_count":21573188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dashboard","data","gisida","map","react","visualization"],"created_at":"2025-01-09T17:19:10.737Z","updated_at":"2025-04-28T15:09:59.743Z","avatar_url":"https://github.com/onaio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## gisida-react\n \u003ch1 align=\"center\"\u003e\n\u003cimg src=\"http://gisida.onalabs.org/resources/img/gisida-logo.png\" width=\"90\" /\u003e\n\u003cimg src=\"http://icons.veryicon.com/ico/System/Icons8%20Metro%20Style/Mathematic%20Plus2.ico\" width=\"100\" /\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/rexxars/react-hexagon/HEAD/logo/react-hexagon.png\" width=\"85\" /\u003e\n\u003c/h1\u003e\n \n React Dashboard library for [gisida](https://github.com/onaio/gisida). Includes a collection of standard componets used to build a Map Dashboard and provides functionality to also render custom components. \n\n ## Installation\n```\n$ npm install gisida-react\n```\n**NOTE:** You can alternetively use [`yarn`](https://yarnpkg.com/en/docs/getting-started) to manage your node packages.\n\n\n## Usage\n ```javascript\nimport React from 'react'\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { initStore } from 'gisida';\nimport { App, TitleBar, Map, Menu, StyleSelector, Legend } from 'gisida-react';\n\n\nconst store = initStore();\n\nReactDOM.render((\n  \u003cProvider store={store}\u003e\n    \u003cApp\u003e\n      \u003cMap /\u003e\n      \u003cMenu /\u003e\n      \u003cTitleBar /\u003e\n      \u003cStyleSelector /\u003e\n      \u003cLegend /\u003e\n    \u003c/ App\u003e\n  \u003c/Provider\u003e\n), document.getElementById('root'));\n```\n\n- To render a custom react component just add it as a child under the `\u003cApp /\u003e` component. \n\nExample:\n\n```javascript\nclass CustomComponent extends React.Component {\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003ch1\u003eA Simple React Component Example\u003c/h1\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n\n \u003cProvider store={store}\u003e\n    \u003cApp\u003e\n      \u003cMap /\u003e\n      \u003cCustomComponent /\u003e\n      \u003c/App\u003e\n  \u003c/Provider\u003e\n```\n\n- To have your compoent use the gisida state as props use [redux connect](https://github.com/reactjs/react-redux/blob/master/docs/api.md#connectmapstatetoprops-mapdispatchtoprops-mergeprops-options). Gisida-react componets also provide a good example of how to achieve this.\n\n\n\n## Development\n\n\n### Local development\n- Clone repo:\n```\n$ git clone git@github.com:onaio/gisida-react.git\n```\n\n#### Run development server:\n\n```\n$ npm start\n```\n\n\n#### Run development build without server:\n\n```\n$ npm develop\n```\n\n### Prodcution build \n\n- Build production distribution\n```\n$ npm build\n```\n\n- Publish to npm\n```\n$ npm publish\n```\n\n## Local development\n1. Check https://github.com/onaio/gisida-react/releases to see what the next release version number should be, i.e. if  the last release is `0.0.7` the next should be `0.0.8` depending on the Semantic Versioning guide, refer to (https://semver.org/).\n\n2. Create branch for new version being released, `git checkout -b \u003cversion-number\u003e` \n\n```\n$ git checkout -b 0.0.8\n```\n\n3. Run `npm version \u003cversion-number\u003e`. This creates a commit and updates version number in package.json.\n```\n$ npm version 0.0.8\n```\n\n4. Push release branch to Github and tag `git push -u --follow-tags origin \u003cversion-number\u003e` e.g\n```\n$ git push -u --follow-tags origin 0.0.8\n```\n\n5. Merge release to master once it passes review\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonaio%2Fgisida-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonaio%2Fgisida-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonaio%2Fgisida-react/lists"}