{"id":22282386,"url":"https://github.com/ohmyjersh/flazzle","last_synced_at":"2025-07-28T20:32:11.464Z","repository":{"id":57238160,"uuid":"119126906","full_name":"ohmyjersh/flazzle","owner":"ohmyjersh","description":"a simplified implementation of feature flags (flippers) with dashboard for react + redux ","archived":false,"fork":false,"pushed_at":"2018-08-17T14:05:59.000Z","size":620,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-01T08:45:38.546Z","etag":null,"topics":["dashboard","feature-flag","feature-flags","feature-toggle","feature-toggles","react","redux"],"latest_commit_sha":null,"homepage":"https://ohmyjersh.github.io/flazzle/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ohmyjersh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-27T02:58:32.000Z","updated_at":"2018-08-17T14:06:01.000Z","dependencies_parsed_at":"2022-08-26T15:11:45.401Z","dependency_job_id":null,"html_url":"https://github.com/ohmyjersh/flazzle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmyjersh%2Fflazzle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmyjersh%2Fflazzle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmyjersh%2Fflazzle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmyjersh%2Fflazzle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ohmyjersh","download_url":"https://codeload.github.com/ohmyjersh/flazzle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227955346,"owners_count":17846867,"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","feature-flag","feature-flags","feature-toggle","feature-toggles","react","redux"],"created_at":"2024-12-03T16:27:26.681Z","updated_at":"2024-12-03T16:27:27.438Z","avatar_url":"https://github.com/ohmyjersh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Flazzle 1.1.0\r\n\r\n## Demo\r\n[Flazzle Demo](https://ohmyjersh.github.io/flazzle/)\r\n\r\n[![Build Status](https://travis-ci.org/ohmyjersh/flazzle.svg?branch=master)](https://travis-ci.org/ohmyjersh/flazzle)\r\n\r\n\u003eMinimalistic feature flag (flipper) library for React + Redux with a sweet dashboard\r\n\r\n## Install\r\n\r\n```sh\r\n# Using Yarn:\r\nyarn add flazzle\r\n\r\n# Or, using NPM:\r\nnpm install flazzle --save\r\n```\r\n\r\n## Use\r\n\r\n### 1. Create feature flag object\r\n```js\r\n    export default {\r\n        featureThing:true\r\n    }\r\n```\r\n*This could be a flat file or generated via an api call*\r\n### 2. Create a store with flags reduxer\r\n\r\n```jsx\r\nimport {createStore, combineReducers} from 'redux';\r\nimport flags from './[FLAG_LOCATION]'\r\nlet store = createStore(combineReducers({app:[ADD_ROOT_REDUCER]], flags:flazzleReducer(flags)}));\r\n```\r\n\r\n*This is just an example, just make sure to include flazzleReducer*\r\n\r\n### 3. Add to the dashboard any component/container with access to the store\r\n```jsx\r\nimport React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\nimport { flazzleActions, FlazzleDashboard } from 'flazzle';\r\nimport 'flazzle/dist/css/index.css';\r\n\r\nexport default props =\u003e (\r\n      \u003cdiv\u003e\r\n            ...\r\n            \u003cFlazzleDashboard flags={props.flags} updateFlags={props.actions.updateFlags} goBack={() =\u003e [PROP_TO_CLOSE_DASHBOARD]} /\u003e\r\n            ...\r\n      \u003c/div\u003e\r\n  );\r\n\r\nfunction mapStateToProps(state) {\r\n  return { state: state.app, flags: state.flags }\r\n}\r\n\r\nfunction mapDispatchToProps(dispatch) {\r\n  return { actions: bindActionCreators(flazzleActions, dispatch) }\r\n}\r\nexport default connect(mapStateToProps, mapDispatchToProps)(App)\r\n```\r\n*Please checkout the demo project within the src folder to see how this is implemented.*\r\n*When using the dashboard, import css styles from flazzle/build/css/index.css*\r\n\r\n### 3. Add to components to hide/show features\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {Flag} from 'flazzle';\r\n\r\nexport default ({flags}) =\u003e {\r\n    return (\r\n        \u003cdiv\u003e\r\n            \u003cFlag className=\"item\" flag={flags.ReplaceStableComponent} experimental={() =\u003e \u003cdiv\u003easdfadf experimental\u003c/div\u003e} stable={() =\u003e \u003cdiv\u003estable\u003c/div\u003e} /\u003e\r\n            \u003cbr /\u003e\r\n            \u003cFlag className=\"item\" flag={flags.AddExperimentalComponent} experimental={() =\u003e \u003cdiv\u003easdf experimental\u003c/div\u003e} /\u003e\r\n            \u003c/div\u003e\r\n        )\r\n}\r\n```\r\n\r\n**That's all there is to it, start flipping.**\r\n\r\n## Local Development\r\n\r\nInstall dependencies:\r\n``` \r\nnpm install\r\n```\r\nBuild Library:\r\n```\r\nnpm run build\r\n```\r\nRun Demo:\r\n```\r\nnpm run demo\r\n```\r\n\r\n## Contributions:\r\n\r\nFeatures, bug fixes and other changes to flazzle are gladly accepted. Please open issues or a pull request with your change.\r\n\r\nThank you for contributing!\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohmyjersh%2Fflazzle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fohmyjersh%2Fflazzle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohmyjersh%2Fflazzle/lists"}