I was trying to understand JavaScript Promises by using various libraries (bluebird, when, Q) and other async approaches.
I read the spec, some blog posts, and looked through some code. I learned how to
| import * as yup from 'yup'; | |
| import { setIn } from 'final-form'; | |
| const validationSchema = yup.object({ | |
| email: yup.string().email(), | |
| shipping: yup.object({ | |
| name: yup.string(), | |
| phone: yup.object({ | |
| code: yup.string().matches(/^\+\d+$/i), | |
| number: yup.number().max(10), |
| import classNameProp from 'class-name-prop'; | |
| import { useRouter } from 'next/router'; | |
| import React from 'react'; | |
| import styles from './RouteIndicator.module.css'; | |
| const DONE_DURATION = 250; | |
| export default function RouteIndicator() { | |
| const router = useRouter(); |
I was trying to understand JavaScript Promises by using various libraries (bluebird, when, Q) and other async approaches.
I read the spec, some blog posts, and looked through some code. I learned how to
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
| <?php | |
| require_once(TOOLKIT . '/class.event.php'); | |
| Class eventsave_order extends Event{ | |
| const ROOTELEMENT = 'save-order'; | |
| public $eParamFILTERS = array( | |
| 'etm-new-order-notification' |
Forms have been an integral part of any interactive site since the dawn of time, they promote interactivity and are usually the most common way users interact with a site. It's commonplace that when a form is submitted, the website will take 'action' and do something with the data and then provide a user with the result. Symphony provides this logic layer via Events.
This tutorial assumes you have a basic understanding of how Events work in Symphony (if not, this may be a good introduction) and are semi comfortable writing some PHP code. I'll be showing you some of the lesser known features of Symphony Events, including event priority, event chaining and a brief demonstration of how to write a custom Event. The difficulty level progresses as we go through, but with any luck you'll be able to learn a thing or two :)
Our client requires a form that allows a user to submit some details about their new car purchase. Th