Questions tagged [glimmer.js]

Glimmer is a UI library for building custom components.

Glimmer is a UI library for building powerful and fast custom components, brought to you by the Ember.js team.

39 questions
12
votes
2 answers

How do I use Glimmer components inside an Ember app?

The Glimmer website states: Just drop your Glimmer components into an Ember app. You won’t need to change a thing. I’ve been following the official Ember quick start tutorial. I replaced the contents of the generated people-list.js component…
Ludovico Fischer
  • 1,602
  • 11
  • 11
7
votes
1 answer

How is Glimmer VM different from a virtual dom?

So I recently started looking into ember js, especially its glimmer rendering engine and trying to understand how it works. So my understanding is that Glimmer VM is a virtual machine that emulates the actual DOM and executes functions to make…
Kid Coder
  • 173
  • 1
  • 5
6
votes
1 answer

How to set initial state of glimmer component based on argument?

I am struggling to figure out how to implement data down, actions up in a glimmer component hierarchy (using Ember Octane, v3.15). I have a parent component with a list of items. When the user clicks on a button within the Parent component, I want…
caseygrun
  • 2,019
  • 1
  • 15
  • 21
5
votes
2 answers

What is the equivalent of react context in glimmerjs?

I've been using react for the past three years and just watched a few talks about ember and glimmer and got interested in glimmer. So excuse my ignorance if the question doesn't make sense. What will be an equivalent of a global state / context in…
Sam R.
  • 16,027
  • 12
  • 69
  • 122
4
votes
0 answers

How to figure out why error happen during running app in ember fastboot

I'm trying to integrate third-party npm library (editorjs like npm package npm i @editorjs/editorjs --save-dev) to ember application with auto loading "ember-auto-import": "^1.5.3", Everything works fine without fastboot, but under fastboot…
user1156168
  • 936
  • 13
  • 32
4
votes
3 answers

How to track a nested attribute in a Glimmer component?

I am building my first Glimmmer component in Ember and I had something like this in my template:

Some val: {{this.my_obj.some.deeply.nested.path.to.val}}

I then made a corresponding .js component file and thought I would try to remove the…
Ginty
  • 3,483
  • 20
  • 24
3
votes
2 answers

How to update nested state in Ember Octane

So my situation is as follows: I got a component with a couple of input fields that represent a contact and are filled with data from a service: @service('contact-data') contact; Each field stands for one property that is accessed…
Grex L
  • 43
  • 4
3
votes
1 answer

Cant we put a ember concurrency task in glimmer component getter, which is tracking the components arguments

-- when an ember concurrency task is called glimmer components getter then it runs in infinite loop. import Component from '@glimmer/component'; import { tracked } from '@glimmer/tracking'; import { inject as service } from '@ember/service'; import…
kdhayal
  • 83
  • 6
2
votes
1 answer

Access HTML element from Glimmer component without modifier

is it possible to access component's HTML element in Glimmer components without the use of did-insert helper? Something as simple as this.element or this.elementId in non-glimmer elements. I've created a class that extends Component that all my…
Igor
  • 592
  • 2
  • 9
  • 31
2
votes
1 answer

Is this a valid usage of @cached for autotracking of Ember Octane?

Recently I encountered an use case of @cached from tracked-toolbox when writing a Glimmer component with autotracking. Here is an example code snippet: import Component from '@glimmer/component'; /** * Example usage *
Qiu Yudong
  • 41
  • 3
2
votes
1 answer

Glimmer.js how to reset tracked property to initial value without using the constructor

In Glimmer.js, what is the best way to reset a tracked property to an initial value without using the constructor? Note: Cannot use the constructor because it is only called once on initial page render and never called again on subsequent page…
bach vo
  • 410
  • 4
  • 5
2
votes
1 answer

component unit testing in Glimmer

For classic component unit tests, how would we migrate this to Glimmer? This component unit test is testing a local prop that is not exposed to the user. const component = this.owner .factoryFor('component:some-component') .create({ …
bach vo
  • 410
  • 4
  • 5
2
votes
0 answers

How do you test a glimmer.js argument?

How do you properly pass an argument to a glimmer.js component in testing? For example, I have a component that accepts @story as an argument, to which I pass a story object. It actually works fine in the code, but I am trying to learn how to test…
Don
  • 746
  • 6
  • 18
2
votes
2 answers

How do I get the parent context from within a component in glimmer?

Let's say I have a simple component in glimmer with a list of items template.hbs
    {{#each @items key="@index" as |item|}}
  • {{ item }}
hsugar
  • 23
  • 3
2
votes
1 answer

glimmer.js IE Support

a new untouched glimmerjs app with ember new my-app -b @glimmer/blueprint ran in firefox and chrome but not in ie or edge. Edge gave me following error: SCRIPT1028: Expected identifier, string or number: app.js (3386,11) IE11: SCRIPT1002:…
edlin98
  • 21
  • 1
1
2 3