Skip to content
This repository was archived by the owner on Aug 27, 2018. It is now read-only.

General design

Paul Jolly edited this page Oct 12, 2016 · 15 revisions

General

  • Move away from requiring react.BlessElement

PureRender

Whether to automatically PureRender for components whose corresponding state and props values are comparable

Intrinsic components

Assuming there is some conclusion to https://github.com/gopherjs/gopherjs/issues/236, we can do away with the existing helper-functions, e.g. PProps, rename the types, e.g. PPropsDef -> PProps, and use the types directly:

x := P(&PProps{ClassName: "wide"}, ...)

For usability reasons, this however means we need to move away from the embedding of, for example *react.BasicHTMLElement, to explicit definition of fields:

type PProps struct {
	o *js.Object

	Id        string `js:"id"`
	Key       string `js:"key"`
	ClassName string `js:"className"`

	// ...
}

This will clearly require some sort of code generation based on some higher-order definition of the props for each component.

Unified state

Follow up with neelance about a different API for the gopherjs/react package that unifies state and props

Clone this wiki locally