lillylabs / www.unlockopen.com

https://unlockopen.com/
MIT License
0 stars 0 forks source link

1. Convert the layout’s children from a render prop to a normal prop #6

Open olavea opened 5 years ago

olavea commented 5 years ago
  1. Convert the layout’s children from a render prop to a normal prop (required)

In v1, the children prop passed to layout was a function (render prop) and needed to be executed. In v2, this is no longer the case.

DIFF (-meaning?-)

import React from "react"
export default ({ children }) => (
  <div>
-    {children()}
+    {children}
  </div>
)
olavea commented 5 years ago

I looked around and it seems like normal props are used here. What do you think @raae ?