Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Content Guides: is it worth it to add more layers of info in the notes/warning callouts? #1044

tmgonzales started this conversation in Ideas
Discussion options

From the perspective of our learners, is it worth it to expand the information of the notes & warning callouts? Adding in examples of incorrect and correct usage - the example below is going through scenarios of adding in a photo component

Reactpy.dev / Docs / Guides / Creating Interfaces / Your First Components

class ComponentType:
 def __init__(self, name):
 self.name = name
def some_function(component):
 if not isinstance(component, ComponentType):
 raise TypeError('Expected a ComponentType, not {}'.format(type(component).__name__))
 # rest of function...
# Using the function correctly
c = ComponentType('example')
some_function(c)
# Using the function incorrectly
d = {'name': 'example'}
some_function(d) # This will raise the TypeError
You must be logged in to vote

Replies: 1 comment

Comment options

Yes this is intended. See #863

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /