-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ContextExample touch ups #1
Conversation
|
||
const AdvancedTable = AddFilter(DataCtxt(Table)); | ||
const FilterablePagingTable = AddFilter(DataCtxt(Table)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed everything which was Advanced to be more descriptive
* @param {string} propName The prop that is to be validated | ||
* @param {string} componentName The name of the component that the prop belongs to | ||
*/ | ||
function PropTypeCtxtData(props, propName, componentName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since propTypes aren't a FDT specific thing and they clutter these examples, I've moved them to a helper file
@@ -1,42 +0,0 @@ | |||
import React from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dead code
@@ -9,6 +9,13 @@ var Constants = require('../Constants'); | |||
|
|||
var ExampleHeader = React.createClass({ | |||
render() { | |||
const contextDisclamer = this.props.page.fileName === 'ContextExample.js' ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is less than ideal, but I didn't see a good way to add this without a larger refactoring.
Description
I've made some cleanups to your Context example. Please let me know your thoughts.
Motivation and Context
Working on making the context example easier to follow.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: