-
-
Notifications
You must be signed in to change notification settings - Fork 327
Content Guides: is it worth it to add more layers of info in the notes/warning callouts? #1044
tmgonzales
started this conversation in
Ideas
-
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
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
Yes this is intended. See #863
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment