From 1fc52cec319d7e0a58f3209c078c80b9e5e41e09 Mon Sep 17 00:00:00 2001 From: John Whiles Date: Fri, 27 Apr 2018 13:37:16 +0100 Subject: [PATCH] =?UTF-8?q?Update=20example=20component=20=F0=9F=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The example code in the README doesn't compile with the current version of purescript-react-basic because the `react` function now expects a `displayName`. Just updating the example so it can be run :) --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a7b2229..06a7c47 100644 --- a/README.md +++ b/README.md @@ -33,11 +33,12 @@ type ExampleProps = } -- Create a component by passing a record to the `react` function. --- The `render` function takes the props and current state, as well as a +-- The `render` function takes a display name, the props and current state, as well as a -- state update callback, and produces a document. example :: ReactComponent ExampleProps example = react - { initialState: { counter: 0 } + { displayName: "Example" + , initialState: { counter: 0 } , receiveProps: \_ _ _ -> pure unit , render: \{ label } { counter } setState -> R.button { onClick: mkEffFn1 \_ -> do