How to get run some components in framework-7 react template?

When I try some code from kitcken-sink react in framework-react-app-template, I cant run it, see errors if I put some component inside Page tag, I get this error

React.createElement: type is invalid – expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it’s defined in.

I read on stackoverflow that error happens also when some components are missing and checked and I see versions are different in package.json so changed react and react-dom to ^16.4.0 (as in kitcken-snik demo) and run npm install and get this error, can you help me ?

$ npm install
npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“ia32”})

added 1 package and updated 2 packages in 37.62s

After this when I run the template it doesnt run et all, I get Cannot read property ‘object’ of undefined for -> framework7AppContext: PropTypes.object

Apparently you are running old version of F7 and F7 React. Check the v3 branch

1 Like

Yes I figured out it.

Btw, for those 2 templates (with v1.5 and v3) ssh clone names are same, couldnt clone to my local without changing folder names.