React Component Lifecycle
- getInitialState
- getDefaultProps
- componentWillMount
- componentDidMount
- shouldComponentUpdate (Update only)
- componentWillUpdate (Update only)
- componentWillReceiveProps (Update only)
- render
| def is_valid_state(state): | |
| # check if it is a valid solution | |
| return True | |
| def get_candidates(state): | |
| return [] | |
| def search(state, solutions): | |
| if is_valid_state(state): | |
| solutions.append(state.copy()) |
| from io import StringIO | |
| from django.core.handlers.wsgi import WSGIRequest | |
| from django.http import HttpResponse | |
| from silk.middleware import SilkyMiddleware | |
| from silk.profiling.profiler import silk_profile | |
| class silk_middleware: | |
| """ |
React Component Lifecycle