3

616xxyppyz - CodeSandbox

 3 years ago
source link: https://codesandbox.io/s/616xxyppyz
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
616xxyppyz - CodeSandbox
Files
public
Field.js
MapDistinct.js
Model.js
index.js
package.json
External resources
Sign in to
✓Save your work✓Work from any device✓Deploy & collaborate
import * as axios from "axios";
import * as Govern from "govern";
import * as React from "react";
import * as ReactDOM from "react-dom";
import { Store, Subscribe } from "react-govern";
import { Field } from "./Field";
import { MapDistinct } from "./MapDistinct";
import { Model } from "./Model";
const RegistrationFormModel = ({ defaultValue }) => ({
  name: <Model defaultValue={defaultValue.name} validate={validateNotEmpty} />,
  email: <Model defaultValue={defaultValue.email} validate={validateEmail} />
RegistrationFormModel.defaultProps = {
  defaultValue: { name: "", email: "" }
class PostRegistrationRequest extends Govern.Component {
  state = {
    status: "fetching"
  publish() {
    return this.state;

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK