Coder Social home page Coder Social logo

jitsu-js's People

Contributors

absorbb avatar flyover-artsk avatar vklimontovich avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jitsu-js's Issues

set is not a function

It appears that 'set' is not being exported. I can see the type definition, but when I break over the object, I do not see it in the list of available functions

console error I get is set is not a function

Screen Shot 2022-06-29 at 12 30 41 PM

Using =>

react: 18+
@jistsu/react: 3.1.2

Next.js 13 support

Hello,

We are migrating our app to Next.js version 13, and @jitsu/nextjs is the only dependency that does not have Next.js 13 as a supported peer dependency.

Are there any plans or ongoing work on supporting Next.js 13 in @jitsu/nextjs?

I have tried out the library in our app using the --legacy-peer-deps flag on npm install, and I have not found any errors with it so far. I believe that Next.js 13 is ready to be added as a peer dependency.

If there are no objections, I will prepare a pull request allowing Next.js 13 as a peer dependency for the @jitsu/nextjs library.

 Property 'children' does not exist on type 'IntrinsicAttributes & JitsuProviderProps'.

Hello, I am trying to do the following:

<JitsuProvider client={jitsuClient}>
  <GrowthBookProvider growthbook={growthbook}>
    {p.children}
  </GrowthBookProvider>
</JitsuProvider>

and I get an error: Property 'children' does not exist on type 'IntrinsicAttributes & JitsuProviderProps'.

I guess the issue could be solved in https://github.com/jitsucom/jitsu-js/blob/master/packages/nextjs/src/JitsuProvider.tsx by using PropsWithChildren:

const JitsuProvider: React.FC<PropsWithChildren<JitsuProviderProps>> = function ({children, client}) {
  const Context = JitsuContext
  return <Context.Provider value={client}>{children}</Context.Provider>
}

Thanks,
Christian

Change HTML snippet to support Google Tag Manager

The HTML snippet in the documentation doesn't work out-of-the-box with Google Tag Manager. It looks like GTM strips the data-* attributes from any <script> tag. I found this comment on Stack Overflow that seems to confirm that.

Here's the workaround I'm using, but it'd be nicer if the documented snippet just worked:

<script>
  window.jitsu = window.jitsu || (function(){(window.jitsuQ = window.jitsuQ || []).push(arguments);});
  var script = document.createElement("script");
  script.dataset.key = "js.XXXXXXXXXXX";
  script.src = "https://t.jitsu.com/s/lib.js";
  document.getElementsByTagName("head")[0].appendChild(script);
</script>

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.