Skip to content

Commit

Permalink
updated readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
mx51damon committed Dec 13, 2021
1 parent c05af3f commit 227ef79
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,17 @@ npm i && npm run serve // run with static server

npm i && npm start // run locally
```

### About error boundary

- It is a error handling concept for React component layer [Answer for `what`]
- For avoid getting page crash on UI, especially during the page rendering or when user interacts with our UI [Answer for `why`]
- Able to collect error information and display the fallback UI
- `componentDidCatch` is a good life cycle method to log the error information or update error tracker state when error detected

### About feature flag

- It is a software development technique, which allows to control feature availability [Answer for `what`]
- When we need to test some features in certain environment (eg: `dev environment`) or for certain type of users (eg: `admin`) [Answer for `why`]
- Good for release process, especially when feature is not confident to be released, we can hold the feature and before decision has been made (Simple explanation: `ship features safely`)
- Sometimes, we might consider <a href="https://www.split.io/blog/feature-flags-as-a-service/" target="_blank">feature flag as a service</a>, for example, we might consider to use it for A/B testing?
2 changes: 1 addition & 1 deletion src/components/FeatureFlagDemo/CompositionDemo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function CompositionDemo() {
standard={standard}
domain={window.location.href}
>
<ErrorBoundaryDemo />
<ErrorBoundaryDemo title={"Error Boundary for Composition demo"} />
</FeatureFlagDemo>
);
}
2 changes: 1 addition & 1 deletion src/components/FeatureFlagDemo/HOCDemo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const standard = 0; // for success demo

const HOCDemoComponent = () => (
<FeatureFlagDemo role={role} standard={standard}>
<ErrorBoundaryDemo />
<ErrorBoundaryDemo title={"Error Boundary for HOC demo"} />
</FeatureFlagDemo>
);

Expand Down

1 comment on commit 227ef79

@vercel
Copy link

@vercel vercel bot commented on 227ef79 Dec 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.