Skip to content

Instantly share code, notes, and snippets.

View robba86's full-sized avatar

Robba robba86

View GitHub Profile
@robba86
robba86 / ParentChild.es6
Created March 14, 2018 18:40 — forked from sebkouba/ParentChild.es6
Basic example to pass values between parent and child components in React.
/**
* Basic example to pass values between parent and child components in React
* Seems to be in line with this
* http://stackoverflow.com/questions/24147331/react-the-right-way-to-pass-form-element-state-to-sibling-parent-elements
* Now I have the state in parent and child. Is that good or bad? Why would I need it in child?
* Could probably take that out
* */
class Parent extends React.Component {
constructor(props) {
super(props);
@robba86
robba86 / password-check.service.ts
Created April 4, 2019 16:20 — forked from leewinder/password-check.service.ts
Typescript object for checking password strength
// Password strengths
export const enum PasswordCheckStrength {
Short,
Common,
Weak,
Ok,
Strong,
};
// Object to check password strengths and various properties