Giter Club home page Giter Club logo

Comments (9)

kelvincy avatar kelvincy commented on June 15, 2024 11

Adding import '@stencil/redux' to the imports fixes it, thanks @serdaraglamis. Although it is a temporary fix, because using @Prop({ context: 'store' }) store: Store is deprecated.

from stencil-redux.

serdaraglamis avatar serdaraglamis commented on June 15, 2024 9

Hello all,

I don't know what will be the solution from Stencil team but I found a solution for now. (Btw I don't know if it's the correct way or not, just it worked for me and I wanted to share)

I checked the code at;
https://github.com/ionic-team/stencil-redux/blob/master/src/global/store.ts

I realized that self-invoked function is never called. So without breaking your existing application, you can simply do this as a temporary solution;
inside global/app.ts or inside your app-root.tsx file simply import @stencil/redux package

for example, if your previous code was looking like

import { Component, h, Prop } from '@stencil/core';
import { Store } from "@stencil/redux";`

then add one line;

import { Component, h, Prop } from '@stencil/core';
import '@stencil/redux';
import { Store } from "@stencil/redux";

from stencil-redux.

felschr avatar felschr commented on June 15, 2024 4

How about removing @stencil/redux from the stencil documentation until the issues are fixed?
Or at least mention its current state and the temporary workaround.

from stencil-redux.

imhoffd avatar imhoffd commented on June 15, 2024 1

This is likely because of this: #19

from stencil-redux.

Gavman66 avatar Gavman66 commented on June 15, 2024 1

Has there been any more word on a proposed official solution to this?

adding the import seems to have mostly worked but still having issues related to this.

from stencil-redux.

edsilv avatar edsilv commented on June 15, 2024 1

It seemed to be working for me with stencil v1.2.4, but after upgrading to v1.3.0 I'm getting this build error:

Global Script: ./node_modules\@stencil\redux\dist\collection\global\store.js
           The code to be executed should be placed within a default function that is exported by the global script.
           Ensure all of the code in the global script is wrapped in the function() that is exported.

from stencil-redux.

bdanzer avatar bdanzer commented on June 15, 2024

I am on v1.2.3 and doing the import mentioned above doesn't seem to work for me.

from stencil-redux.

edsilv avatar edsilv commented on June 15, 2024

fixes it for me: #49

from stencil-redux.

bitflower avatar bitflower commented on June 15, 2024

Using it successfully since months, currently in 1.8.8

from stencil-redux.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.